aboutsummaryrefslogtreecommitdiff
path: root/src/test/data/script_valid.json
diff options
context:
space:
mode:
authorDave Collins <davec@conformal.com>2015-05-06 10:16:18 -0500
committerDave Collins <davec@conformal.com>2015-05-06 10:20:18 -0500
commit1c54757f8678c9131ec55c128b8f1d5b6c73c2f9 (patch)
treef17bd86f25db63b6cdc915a1d1c516f5215380e4 /src/test/data/script_valid.json
parent1fd2d39529b53fdf0a8451a1dd57ba8e51ddb77a (diff)
Add more script edge condition tests.
This commit adds some tests to the script_valid.json and tx_invalid.json data which exercise more edge conditions that are not currently being tested.
Diffstat (limited to 'src/test/data/script_valid.json')
-rw-r--r--src/test/data/script_valid.json3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/data/script_valid.json b/src/test/data/script_valid.json
index 064dde8464..a4e15faeaf 100644
--- a/src/test/data/script_valid.json
+++ b/src/test/data/script_valid.json
@@ -74,12 +74,14 @@
["1 1", "VERIFY", "P2SH,STRICTENC"],
["1 0x05 0x01 0x00 0x00 0x00 0x00", "VERIFY", "P2SH,STRICTENC", "values >4 bytes can be cast to boolean"],
+["1 0x01 0x80", "IF 0 ENDIF", "P2SH,STRICTENC", "negative 0 is false"],
["10 0 11 TOALTSTACK DROP FROMALTSTACK", "ADD 21 EQUAL", "P2SH,STRICTENC"],
["'gavin_was_here' TOALTSTACK 11 FROMALTSTACK", "'gavin_was_here' EQUALVERIFY 11 EQUAL", "P2SH,STRICTENC"],
["0 IFDUP", "DEPTH 1 EQUALVERIFY 0 EQUAL", "P2SH,STRICTENC"],
["1 IFDUP", "DEPTH 2 EQUALVERIFY 1 EQUALVERIFY 1 EQUAL", "P2SH,STRICTENC"],
+["0x05 0x0100000000 IFDUP", "DEPTH 2 EQUALVERIFY 0x05 0x0100000000 EQUAL", "P2SH,STRICTENC", "IFDUP dups non ints"],
["0 DROP", "DEPTH 0 EQUAL", "P2SH,STRICTENC"],
["0", "DUP 1 ADD 1 EQUALVERIFY 0 EQUAL", "P2SH,STRICTENC"],
["0 1", "NIP", "P2SH,STRICTENC"],
@@ -408,6 +410,7 @@
["0 0", "EQUAL", "P2SH,STRICTENC"],
["0 0", "EQUALVERIFY 1", "P2SH,STRICTENC"],
+["0 0 1", "EQUAL EQUAL", "P2SH,STRICTENC", "OP_0 and bools must have identical byte representations"],
["0", "1ADD", "P2SH,STRICTENC"],
["2", "1SUB", "P2SH,STRICTENC"],