Skip to content

Commit 26dc2da

Browse files
committed
Merge #12425: Add some script tests
be45a67 Add some script tests related to BOOL ops and odd values like negative 0. (Richard Kiss) Pull request description: Add some script tests related to BOOL ops and odd values like negative 0. Tree-SHA512: 8e633f7ea5eea39e31016994baf60f295fa1dc8cae27aa5fcfc741ea97136bfb3ddc57bb62b9c6bf9fe256fc09cdd184906ba8e611e297cf8d2d363da2bbf1d4
2 parents 1f055ef + be45a67 commit 26dc2da

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/test/data/script_tests.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,18 @@
168168
["1 0 BOOLOR", "NOP", "P2SH,STRICTENC", "OK"],
169169
["0 1 BOOLOR", "NOP", "P2SH,STRICTENC", "OK"],
170170
["0 0 BOOLOR", "NOT", "P2SH,STRICTENC", "OK"],
171+
["0x01 0x80", "DUP BOOLOR", "P2SH,STRICTENC", "EVAL_FALSE", "negative-0 negative-0 BOOLOR"],
172+
["0x01 0x00", "DUP BOOLOR", "P2SH,STRICTENC", "EVAL_FALSE", " non-minimal-0 non-minimal-0 BOOLOR"],
173+
["0x01 0x81", "DUP BOOLOR", "P2SH,STRICTENC", "OK", "-1 -1 BOOLOR"],
174+
["0x01 0x80", "DUP BOOLAND", "P2SH,STRICTENC", "EVAL_FALSE", "negative-0 negative-0 BOOLAND"],
175+
["0x01 0x00", "DUP BOOLAND", "P2SH,STRICTENC", "EVAL_FALSE", " non-minimal-0 non-minimal-0 BOOLAND"],
176+
["0x01 0x81", "DUP BOOLAND", "P2SH,STRICTENC", "OK", "-1 -1 BOOLAND"],
177+
["0x01 0x00", "NOT", "P2SH,STRICTENC", "OK", "non-minimal-0 NOT"],
178+
["0x01 0x80", "NOT", "P2SH,STRICTENC", "OK", "negative-0 NOT"],
179+
["0x01 0x81", "NOT", "P2SH,STRICTENC", "EVAL_FALSE", "negative 1 NOT"],
180+
["0x01 0x80 0", "NUMEQUAL", "P2SH", "OK", "-0 0 NUMEQUAL"],
181+
["0x01 0x00 0", "NUMEQUAL", "P2SH", "OK", "non-minimal-0 0 NUMEQUAL"],
182+
["0x02 0x00 0x00 0", "NUMEQUAL", "P2SH", "OK", "non-minimal-0 0 NUMEQUAL"],
171183
["16 17 BOOLOR", "NOP", "P2SH,STRICTENC", "OK"],
172184
["11 10 1 ADD", "NUMEQUAL", "P2SH,STRICTENC", "OK"],
173185
["11 10 1 ADD", "NUMEQUALVERIFY 1", "P2SH,STRICTENC", "OK"],

0 commit comments

Comments
 (0)