-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: start support bytes conversion 2268
close #2268
- Loading branch information
Zainen Suzuki
authored and
Zainen Suzuki
committed
Jan 23, 2023
1 parent
e7613d5
commit b12c135
Showing
6 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
packages/taquito-michel-codec/test/contracts_016/opcodes/bytes_of_int.tz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
parameter unit; | ||
storage unit; | ||
code { DROP; | ||
|
||
PUSH int 0; BYTES; PUSH bytes 0x; ASSERT_CMPEQ; | ||
PUSH int 1; BYTES; PUSH bytes 0x01; ASSERT_CMPEQ; | ||
PUSH int 1193046; BYTES; PUSH bytes 0x123456; ASSERT_CMPEQ; | ||
|
||
PUSH bytes 0x123456; INT; PUSH int 1193046; ASSERT_CMPEQ; | ||
PUSH bytes 0x0000123456; INT; PUSH int 1193046; ASSERT_CMPEQ; | ||
PUSH bytes 0x; INT; PUSH int 0; ASSERT_CMPEQ; | ||
PUSH bytes 0x0000; INT; PUSH int 0; ASSERT_CMPEQ; | ||
|
||
PUSH int -128; BYTES; PUSH bytes 0x80; ASSERT_CMPEQ; | ||
PUSH int -129; BYTES; PUSH bytes 0xff7f; ASSERT_CMPEQ; | ||
PUSH int -33024; BYTES; PUSH bytes 0xff7f00; ASSERT_CMPEQ; | ||
PUSH int -4294967296; BYTES; PUSH bytes 0xff00000000; ASSERT_CMPEQ; | ||
|
||
PUSH bytes 0x80; INT; PUSH int -128; ASSERT_CMPEQ; | ||
PUSH bytes 0xff7f; INT; PUSH int -129; ASSERT_CMPEQ; | ||
PUSH bytes 0xff7f00; INT; PUSH int -33024; ASSERT_CMPEQ; | ||
PUSH bytes 0xffffff7f00; INT; PUSH int -33024; ASSERT_CMPEQ; | ||
PUSH bytes 0xff00000000; INT; PUSH int -4294967296; ASSERT_CMPEQ; | ||
|
||
UNIT; NIL operation; PAIR; } |
14 changes: 14 additions & 0 deletions
14
packages/taquito-michel-codec/test/contracts_016/opcodes/bytes_of_nat.tz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
parameter unit; | ||
storage unit; | ||
code { DROP; | ||
|
||
PUSH nat 0; BYTES; PUSH bytes 0x; ASSERT_CMPEQ; | ||
PUSH nat 1; BYTES; PUSH bytes 0x01; ASSERT_CMPEQ; | ||
PUSH nat 1193046; BYTES; PUSH bytes 0x123456; ASSERT_CMPEQ; | ||
|
||
PUSH bytes 0x123456; NAT; PUSH nat 1193046; ASSERT_CMPEQ; | ||
PUSH bytes 0x0000123456; NAT; PUSH nat 1193046; ASSERT_CMPEQ; | ||
PUSH bytes 0x; NAT; PUSH nat 0; ASSERT_CMPEQ; | ||
PUSH bytes 0x0000; NAT; PUSH nat 0; ASSERT_CMPEQ; | ||
|
||
UNIT; NIL operation; PAIR; } |