script: add additional script tests

This commit is contained in:
Cory Fields 2014-04-22 00:10:33 -04:00
parent 05e3ecffa4
commit 90320d6777
2 changed files with 16 additions and 0 deletions

View file

@ -257,7 +257,10 @@
["1","0xba", "0xba == OP_NOP10 + 1"], ["1","0xba", "0xba == OP_NOP10 + 1"],
["2147483648", "1ADD 1", "We cannot do math on 5-byte integers"], ["2147483648", "1ADD 1", "We cannot do math on 5-byte integers"],
["2147483648", "NEGATE 1", "We cannot do math on 5-byte integers"],
["-2147483648", "1ADD 1", "Because we use a sign bit, -2147483648 is also 5 bytes"], ["-2147483648", "1ADD 1", "Because we use a sign bit, -2147483648 is also 5 bytes"],
["2147483647", "1ADD 1SUB 1", "We cannot do math on 5-byte integers, even if the result is 4-bytes"],
["2147483648", "1SUB 1", "We cannot do math on 5-byte integers, even if the result is 4-bytes"],
["1", "1 ENDIF", "ENDIF without IF"], ["1", "1 ENDIF", "ENDIF without IF"],
["1", "IF 1", "IF without ENDIF"], ["1", "IF 1", "IF without ENDIF"],

View file

@ -97,6 +97,9 @@
["8388608", "SIZE 4 EQUAL"], ["8388608", "SIZE 4 EQUAL"],
["2147483647", "SIZE 4 EQUAL"], ["2147483647", "SIZE 4 EQUAL"],
["2147483648", "SIZE 5 EQUAL"], ["2147483648", "SIZE 5 EQUAL"],
["549755813887", "SIZE 5 EQUAL"],
["549755813888", "SIZE 6 EQUAL"],
["9223372036854775807", "SIZE 8 EQUAL"],
["-1", "SIZE 1 EQUAL"], ["-1", "SIZE 1 EQUAL"],
["-127", "SIZE 1 EQUAL"], ["-127", "SIZE 1 EQUAL"],
["-128", "SIZE 2 EQUAL"], ["-128", "SIZE 2 EQUAL"],
@ -106,6 +109,9 @@
["-8388608", "SIZE 4 EQUAL"], ["-8388608", "SIZE 4 EQUAL"],
["-2147483647", "SIZE 4 EQUAL"], ["-2147483647", "SIZE 4 EQUAL"],
["-2147483648", "SIZE 5 EQUAL"], ["-2147483648", "SIZE 5 EQUAL"],
["-549755813887", "SIZE 5 EQUAL"],
["-549755813888", "SIZE 6 EQUAL"],
["-9223372036854775807", "SIZE 8 EQUAL"],
["'abcdefghijklmnopqrstuvwxyz'", "SIZE 26 EQUAL"], ["'abcdefghijklmnopqrstuvwxyz'", "SIZE 26 EQUAL"],
@ -306,6 +312,9 @@
["8388608", "0x04 0x00008000 EQUAL"], ["8388608", "0x04 0x00008000 EQUAL"],
["2147483647", "0x04 0xFFFFFF7F EQUAL"], ["2147483647", "0x04 0xFFFFFF7F EQUAL"],
["2147483648", "0x05 0x0000008000 EQUAL"], ["2147483648", "0x05 0x0000008000 EQUAL"],
["549755813887", "0x05 0xFFFFFFFF7F EQUAL"],
["549755813888", "0x06 0xFFFFFFFF7F EQUAL"],
["9223372036854775807", "0x08 0xFFFFFFFFFFFFFF7F EQUAL"],
["-1", "0x01 0x81 EQUAL", "Numbers are little-endian with the MSB being a sign bit"], ["-1", "0x01 0x81 EQUAL", "Numbers are little-endian with the MSB being a sign bit"],
["-127", "0x01 0xFF EQUAL"], ["-127", "0x01 0xFF EQUAL"],
["-128", "0x02 0x8080 EQUAL"], ["-128", "0x02 0x8080 EQUAL"],
@ -315,6 +324,10 @@
["-8388608", "0x04 0x00008080 EQUAL"], ["-8388608", "0x04 0x00008080 EQUAL"],
["-2147483647", "0x04 0xFFFFFFFF EQUAL"], ["-2147483647", "0x04 0xFFFFFFFF EQUAL"],
["-2147483648", "0x05 0x0000008080 EQUAL"], ["-2147483648", "0x05 0x0000008080 EQUAL"],
["-4294967295", "0x05 0xFFFFFFFF80 EQUAL"],
["-549755813887", "0x05 0xFFFFFFFFFF EQUAL"],
["-549755813888", "0x06 0x000000008080 EQUAL"],
["-9223372036854775807", "0x08 0xFFFFFFFFFFFFFFFF EQUAL"],
["2147483647", "1ADD 2147483648 EQUAL", "We can do math on 4-byte integers, and compare 5-byte ones"], ["2147483647", "1ADD 2147483648 EQUAL", "We can do math on 4-byte integers, and compare 5-byte ones"],
["2147483647", "1ADD 1"], ["2147483647", "1ADD 1"],