aboutsummaryrefslogtreecommitdiff
path: root/src/test/data
diff options
context:
space:
mode:
authorRichard Kiss <him@richardkiss.com>2018-02-13 10:34:04 -0800
committerRichard Kiss <him@richardkiss.com>2018-02-13 10:35:04 -0800
commitbe45a67895f1259eaee80cfb122a849a400ae1ad (patch)
tree83f886d104dcaa61f66b2f1f265577e98b82b0bd /src/test/data
parentf4f4f51f1a940a239c9b406fe3b362bf3303cbce (diff)
downloadbitcoin-be45a67895f1259eaee80cfb122a849a400ae1ad.tar.xz
Add some script tests related to BOOL ops and odd values like negative 0.
Diffstat (limited to 'src/test/data')
-rw-r--r--src/test/data/script_tests.json12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/data/script_tests.json b/src/test/data/script_tests.json
index 63f43c0fc6..ccefe52246 100644
--- a/src/test/data/script_tests.json
+++ b/src/test/data/script_tests.json
@@ -168,6 +168,18 @@
["1 0 BOOLOR", "NOP", "P2SH,STRICTENC", "OK"],
["0 1 BOOLOR", "NOP", "P2SH,STRICTENC", "OK"],
["0 0 BOOLOR", "NOT", "P2SH,STRICTENC", "OK"],
+["0x01 0x80", "DUP BOOLOR", "P2SH,STRICTENC", "EVAL_FALSE", "negative-0 negative-0 BOOLOR"],
+["0x01 0x00", "DUP BOOLOR", "P2SH,STRICTENC", "EVAL_FALSE", " non-minimal-0 non-minimal-0 BOOLOR"],
+["0x01 0x81", "DUP BOOLOR", "P2SH,STRICTENC", "OK", "-1 -1 BOOLOR"],
+["0x01 0x80", "DUP BOOLAND", "P2SH,STRICTENC", "EVAL_FALSE", "negative-0 negative-0 BOOLAND"],
+["0x01 0x00", "DUP BOOLAND", "P2SH,STRICTENC", "EVAL_FALSE", " non-minimal-0 non-minimal-0 BOOLAND"],
+["0x01 0x81", "DUP BOOLAND", "P2SH,STRICTENC", "OK", "-1 -1 BOOLAND"],
+["0x01 0x00", "NOT", "P2SH,STRICTENC", "OK", "non-minimal-0 NOT"],
+["0x01 0x80", "NOT", "P2SH,STRICTENC", "OK", "negative-0 NOT"],
+["0x01 0x81", "NOT", "P2SH,STRICTENC", "EVAL_FALSE", "negative 1 NOT"],
+["0x01 0x80 0", "NUMEQUAL", "P2SH", "OK", "-0 0 NUMEQUAL"],
+["0x01 0x00 0", "NUMEQUAL", "P2SH", "OK", "non-minimal-0 0 NUMEQUAL"],
+["0x02 0x00 0x00 0", "NUMEQUAL", "P2SH", "OK", "non-minimal-0 0 NUMEQUAL"],
["16 17 BOOLOR", "NOP", "P2SH,STRICTENC", "OK"],
["11 10 1 ADD", "NUMEQUAL", "P2SH,STRICTENC", "OK"],
["11 10 1 ADD", "NUMEQUALVERIFY 1", "P2SH,STRICTENC", "OK"],