New tests for BNOT and SIGNEXTEND

pull/426/head
Christoph Jentzsch 10 years ago
parent c9eae764b8
commit 155d449be2
  1. 446
      vmtests/vmArithmeticTest.json
  2. 174
      vmtests/vmBitwiseLogicOperationTest.json
  3. 42
      vmtests/vmSha3Test.json

File diff suppressed because it is too large Load Diff

@ -1622,7 +1622,7 @@
}
}
},
"signextend0" : {
"signextendInvalidByteNumber" : {
"callcreates" : [
],
"env" : {
@ -1636,35 +1636,36 @@
"exec" : {
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"code" : "0x62122ff4600016600057",
"code" : "0x62126af4605016600057",
"data" : "0x",
"gas" : "10000",
"gasPrice" : "100000000000000",
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"value" : "1000000000000000000"
},
"gas" : "9896",
"gas" : "9696",
"out" : "0x",
"post" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x62122ff4600016600057",
"code" : "0x62126af4605016600057",
"nonce" : "0",
"storage" : {
"0x" : "0x126af4"
}
}
},
"pre" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x62122ff4600016600057",
"code" : "0x62126af4605016600057",
"nonce" : "0",
"storage" : {
}
}
}
},
"signextend1" : {
"signextend_00" : {
"callcreates" : [
],
"env" : {
@ -1678,7 +1679,7 @@
"exec" : {
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"code" : "0x62122f6a600016600057",
"code" : "0x6000600016600057",
"data" : "0x",
"gas" : "10000",
"gasPrice" : "100000000000000",
@ -1690,7 +1691,7 @@
"post" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x62122f6a600016600057",
"code" : "0x6000600016600057",
"nonce" : "0",
"storage" : {
}
@ -1699,14 +1700,14 @@
"pre" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x62122f6a600016600057",
"code" : "0x6000600016600057",
"nonce" : "0",
"storage" : {
}
}
}
},
"signextend2" : {
"signextend_0_BigByte" : {
"callcreates" : [
],
"env" : {
@ -1720,7 +1721,7 @@
"exec" : {
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"code" : "0x6212faf4600116600057",
"code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600016600057",
"data" : "0x",
"gas" : "10000",
"gasPrice" : "100000000000000",
@ -1732,24 +1733,24 @@
"post" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x6212faf4600116600057",
"code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600016600057",
"nonce" : "0",
"storage" : {
"0x" : "0x01"
"0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
}
}
},
"pre" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x6212faf4600116600057",
"code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600016600057",
"nonce" : "0",
"storage" : {
}
}
}
},
"signextend3" : {
"signextend_AlmostBiggestByte" : {
"callcreates" : [
],
"env" : {
@ -1763,7 +1764,7 @@
"exec" : {
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"code" : "0x62126af4600116600057",
"code" : "0x7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe16600057",
"data" : "0x",
"gas" : "10000",
"gasPrice" : "100000000000000",
@ -1775,24 +1776,24 @@
"post" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x62126af4600116600057",
"code" : "0x7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe16600057",
"nonce" : "0",
"storage" : {
"0x" : "0x01"
"0x" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe"
}
}
},
"pre" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x62126af4600116600057",
"code" : "0x7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe16600057",
"nonce" : "0",
"storage" : {
}
}
}
},
"signextend4" : {
"signextend_BigByteBigByte" : {
"callcreates" : [
],
"env" : {
@ -1806,7 +1807,7 @@
"exec" : {
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"code" : "0x62126af4605016600057",
"code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600057",
"data" : "0x",
"gas" : "10000",
"gasPrice" : "100000000000000",
@ -1818,24 +1819,24 @@
"post" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x62126af4605016600057",
"code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600057",
"nonce" : "0",
"storage" : {
"0x" : "0x50"
"0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
}
}
},
"pre" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x62126af4605016600057",
"code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600057",
"nonce" : "0",
"storage" : {
}
}
}
},
"signextend5" : {
"signextend_BigByte_0" : {
"callcreates" : [
],
"env" : {
@ -1849,7 +1850,7 @@
"exec" : {
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"code" : "0x6000600016600057",
"code" : "0x60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600057",
"data" : "0x",
"gas" : "10000",
"gasPrice" : "100000000000000",
@ -1861,7 +1862,7 @@
"post" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x6000600016600057",
"code" : "0x60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600057",
"nonce" : "0",
"storage" : {
}
@ -1870,14 +1871,14 @@
"pre" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x6000600016600057",
"code" : "0x60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600057",
"nonce" : "0",
"storage" : {
}
}
}
},
"signextend6" : {
"signextend_BitIsNotSet" : {
"callcreates" : [
],
"env" : {
@ -1891,35 +1892,36 @@
"exec" : {
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600016600057",
"code" : "0x62122f6a600016600057",
"data" : "0x",
"gas" : "10000",
"gasPrice" : "100000000000000",
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"value" : "1000000000000000000"
},
"gas" : "9896",
"gas" : "9696",
"out" : "0x",
"post" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600016600057",
"code" : "0x62122f6a600016600057",
"nonce" : "0",
"storage" : {
"0x" : "0x6a"
}
}
},
"pre" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600016600057",
"code" : "0x62122f6a600016600057",
"nonce" : "0",
"storage" : {
}
}
}
},
"signextend7" : {
"signextend_BitIsNotSetInHigherByte" : {
"callcreates" : [
],
"env" : {
@ -1933,7 +1935,7 @@
"exec" : {
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600057",
"code" : "0x62126af4600116600057",
"data" : "0x",
"gas" : "10000",
"gasPrice" : "100000000000000",
@ -1945,24 +1947,24 @@
"post" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600057",
"code" : "0x62126af4600116600057",
"nonce" : "0",
"storage" : {
"0x" : "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
"0x" : "0x6af4"
}
}
},
"pre" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600057",
"code" : "0x62126af4600116600057",
"nonce" : "0",
"storage" : {
}
}
}
},
"signextend8" : {
"signextend_BitIsSetInHigherByte" : {
"callcreates" : [
],
"env" : {
@ -1976,7 +1978,7 @@
"exec" : {
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"code" : "0x7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe16600057",
"code" : "0x6212faf4600116600057",
"data" : "0x",
"gas" : "10000",
"gasPrice" : "100000000000000",
@ -1988,17 +1990,103 @@
"post" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe16600057",
"code" : "0x6212faf4600116600057",
"nonce" : "0",
"storage" : {
"0x" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe"
"0x" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffaf4"
}
}
},
"pre" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe16600057",
"code" : "0x6212faf4600116600057",
"nonce" : "0",
"storage" : {
}
}
}
},
"signextend_bigBytePlus1" : {
"callcreates" : [
],
"env" : {
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "256",
"currentGasLimit" : "1000000",
"currentNumber" : "0",
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"exec" : {
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"code" : "0x66f000000000000161ffff16600057",
"data" : "0x",
"gas" : "10000",
"gasPrice" : "100000000000000",
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"value" : "1000000000000000000"
},
"gas" : "9696",
"out" : "0x",
"post" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x66f000000000000161ffff16600057",
"nonce" : "0",
"storage" : {
"0x" : "0xf0000000000001"
}
}
},
"pre" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x66f000000000000161ffff16600057",
"nonce" : "0",
"storage" : {
}
}
}
},
"signextend_bitIsSet" : {
"callcreates" : [
],
"env" : {
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "256",
"currentGasLimit" : "1000000",
"currentNumber" : "0",
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"exec" : {
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"code" : "0x62122ff4600016600057",
"data" : "0x",
"gas" : "10000",
"gasPrice" : "100000000000000",
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"value" : "1000000000000000000"
},
"gas" : "9696",
"out" : "0x",
"post" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x62122ff4600016600057",
"nonce" : "0",
"storage" : {
"0x" : "0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff4"
}
}
},
"pre" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x62122ff4600016600057",
"nonce" : "0",
"storage" : {
}

@ -169,5 +169,47 @@
}
}
}
},
"sha3_4" : {
"callcreates" : [
],
"env" : {
"currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
"currentDifficulty" : "256",
"currentGasLimit" : "1000000",
"currentNumber" : "0",
"currentTimestamp" : "1",
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"
},
"exec" : {
"address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
"caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff20600057",
"data" : "0x",
"gas" : "10000",
"gasPrice" : "100000000000000",
"origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
"value" : "1000000000000000000"
},
"gas" : "0",
"out" : "0x",
"post" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff20600057",
"nonce" : "0",
"storage" : {
}
}
},
"pre" : {
"0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
"balance" : "1000000000000000000",
"code" : "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff20600057",
"nonce" : "0",
"storage" : {
}
}
}
}
}
Loading…
Cancel
Save