aboutsummaryrefslogtreecommitdiff
path: root/src/test/data
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2012-05-24 13:29:08 -0400
committerGavin Andresen <gavinandresen@gmail.com>2012-05-24 13:29:08 -0400
commitf04017f702e36563b9ba05b3fede216767de580a (patch)
tree4bb9e411a29dd95c602c5299d4e93060bac00700 /src/test/data
parentb92095f18c12bef3cc6fd621bdbda26efb126a6f (diff)
More CScript unit tests.
Diffstat (limited to 'src/test/data')
-rw-r--r--src/test/data/script_invalid.json6
-rw-r--r--src/test/data/script_valid.json10
2 files changed, 15 insertions, 1 deletions
diff --git a/src/test/data/script_invalid.json b/src/test/data/script_invalid.json
index c05d3ba5b2..f06c3beea3 100644
--- a/src/test/data/script_invalid.json
+++ b/src/test/data/script_invalid.json
@@ -10,7 +10,7 @@
["2147483648 0 ADD", "NOP", "arithmetic operands must be in range [-2^31...2^31] "],
["-2147483648 0 ADD", "NOP", "arithmetic operands must be in range [-2^31...2^31] "],
["2147483647 DUP ADD", "4294967294 NUMEQUAL", "NUMEQUAL must be in numeric range"],
-["0xaabbccddeeff NOT", "0 EQUAL", "NOT is an arithmetic operand"],
+["'abcdef' NOT", "0 EQUAL", "NOT is an arithmetic operand"],
["2 DUP MUL", "4 EQUAL", "disabled"],
["2 DUP DIV", "1 EQUAL", "disabled"],
@@ -20,6 +20,10 @@
["2 2 LSHIFT", "8 EQUAL", "disabled"],
["2 1 RSHIFT", "1 EQUAL", "disabled"],
+["1","NOP1 NOP2 NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10 2 EQUAL"],
+["'NOP_1_to_10' NOP1 NOP2 NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10","'NOP_1_to_11' EQUAL"],
+
+["0x50","1", "opcode 0x50 is reserved"],
["NOP1","NOP10"]
]
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index e7ad6d9cc0..f59d8b7284 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -1,4 +1,12 @@
[
+["0x4c0107","7 EQUAL", "0x4c is OP_PUSHDATA1"],
+["0x4d010008","8 EQUAL", "0x4d is OP_PUSHDATA2"],
+["0x4e0100000009","9 EQUAL", "0x4e is OP_PUSHDATA4"],
+
+["0x4c00","0 EQUAL"],
+["0x4d0000","0 EQUAL"],
+["0x4e00000000","0 EQUAL"],
+
["2 -2 ADD", "0 EQUAL"],
["2147483647 -2147483647 ADD", "0 EQUAL"],
["-1 -1 ADD", "-2 EQUAL"],
@@ -73,6 +81,8 @@
["2147483647 DUP ADD", "4294967294 EQUAL", ">32 bit EQUAL is valid"],
["2147483647 NEGATE DUP ADD", "-4294967294 EQUAL"],
+["1","NOP1 NOP2 NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10 1 EQUAL"],
+["'NOP_1_to_10' NOP1 NOP2 NOP3 NOP4 NOP5 NOP6 NOP7 NOP8 NOP9 NOP10","'NOP_1_to_10' EQUAL"],
["NOP","1"]
]