Browse Source

Ensure MINIMALDATA invalid tests can only fail one way

Removes the need for the 'negated' versions of the tests, and ensures
other failures don't mask what we're trying to test.
pull/145/head
Peter Todd 10 years ago
committed by Pieter Wuille
parent
commit
554147ad9e
  1. 12
      src/test/data/script_invalid.json

12
src/test/data/script_invalid.json

@ -384,6 +384,18 @@ nSequences are max.
["0x00", "'00' EQUAL", "P2SH,STRICTENC", "Basic OP_0 execution"],
["0x01 0x81", "DROP 1", "MINIMALDATA", "direct push of 0x81 equals 1NEGATE"],
["0x01 0x05", "DROP 1", "MINIMALDATA", "direct push of 0x05 equals 5"],
["0x4c 0x48 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "DROP 1", "MINIMALDATA", "PUSHDATA1 of 72 bytes equals direct push of it"],
["0x4d 0xFF00 0x111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111", "DROP 1", "MINIMALDATA", "PUSHDATA2 of 255 bytes equals PUSHDATA1 of it"],
["0x01 0x00", "NOT DROP 1", "MINIMALDATA", "0x00 numequals 0"],
["0x01 0x80", "NOT DROP 1", "MINIMALDATA", "0x80 (negative zero) numequals 0"],
["0x02 0x0080", "NOT DROP 1", "MINIMALDATA", "0x0080 numequals 0"],
["0x02 0x0500", "NOT DROP 1", "MINIMALDATA", "0x0500 numequals 5"],
["0x03 0xff7f80", "NOT DROP 1", "MINIMALDATA", "Minimal encoding is ffff"],
["0x03 0xff7f00", "NOT DROP 1", "MINIMALDATA", "Minimal encoding is ff7f"],
["0x04 0xffff7f80", "NOT DROP 1", "MINIMALDATA", "Minimal encoding is ffffff"],
["0x04 0xffff7f00", "NOT DROP 1", "MINIMALDATA", "Minimal encoding is ffff7f"],
["1 IF 0x01 0x81 ENDIF 1", "", "MINIMALDATA", "evaluated non-minimal data"],
["1 IF 0x01 0x05 ENDIF 1", "", "MINIMALDATA", "evaluated non-minimal data"],
["1 IF 0x4c 0x03 0x222222 ENDIF 1", "", "MINIMALDATA", "evaluated non-minimal data"],

Loading…
Cancel
Save