aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2018-05-09 23:44:30 +0800
committerGitHub <noreply@github.com>2018-05-09 23:44:30 +0800
commit41a349dd1335f6a71581b3c79c35102057695f5e (patch)
tree3de65769c0efef15e8d03e9f79a3b8c74bb714fc
parentff9c8191d017bed2aa0afe9c397130e325b39595 (diff)
parentf29231491230e400ba3728e912baf78cc46df46b (diff)
downloaddexon-tests-41a349dd1335f6a71581b3c79c35102057695f5e.tar
dexon-tests-41a349dd1335f6a71581b3c79c35102057695f5e.tar.gz
dexon-tests-41a349dd1335f6a71581b3c79c35102057695f5e.tar.bz2
dexon-tests-41a349dd1335f6a71581b3c79c35102057695f5e.tar.lz
dexon-tests-41a349dd1335f6a71581b3c79c35102057695f5e.tar.xz
dexon-tests-41a349dd1335f6a71581b3c79c35102057695f5e.tar.zst
dexon-tests-41a349dd1335f6a71581b3c79c35102057695f5e.zip
Merge pull request #454 from ethereum/bytes-arithmetic
add vm test for arithmetic (add) after byte
-rw-r--r--VMTests/vmBitwiseLogicOperation/byteBN.json52
-rw-r--r--src/VMTestsFiller/vmBitwiseLogicOperation/byteBNFiller.json36
2 files changed, 88 insertions, 0 deletions
diff --git a/VMTests/vmBitwiseLogicOperation/byteBN.json b/VMTests/vmBitwiseLogicOperation/byteBN.json
new file mode 100644
index 000000000..4939c0269
--- /dev/null
+++ b/VMTests/vmBitwiseLogicOperation/byteBN.json
@@ -0,0 +1,52 @@
+{
+ "byteBN" : {
+ "_info" : {
+ "comment" : "",
+ "filledwith" : "cpp-1.3.0+commit.6ae986d2.Linux.g++",
+ "lllcversion" : "Version: 0.4.19+commit.c4cbbb05.Linux.clang",
+ "source" : "src/VMTestsFiller/vmBitwiseLogicOperation/byteBNFiller.json",
+ "sourceHash" : "5d2c4a67b3c2ccb6c5639356c952756ce48f5ced3bffc96b239ef9e103a0db07"
+ },
+ "callcreates" : [
+ ],
+ "env" : {
+ "currentCoinbase" : "0x2adc25665018aa1fe0e6bc666dac8fc2697ff9ba",
+ "currentDifficulty" : "0x0100",
+ "currentGasLimit" : "0x0f4240",
+ "currentNumber" : "0x00",
+ "currentTimestamp" : "0x01"
+ },
+ "exec" : {
+ "address" : "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
+ "caller" : "0xcd1722f3947def4cf144679da39c4c32bdc35681",
+ "code" : "0x641234523456601f1a8001600155",
+ "data" : "0x",
+ "gas" : "0x0186a0",
+ "gasPrice" : "0x5af3107a4000",
+ "origin" : "0xcd1722f3947def4cf144679da39c4c32bdc35681",
+ "value" : "0x0de0b6b3a7640000"
+ },
+ "gas" : "0x01386e",
+ "logs" : "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
+ "out" : "0x",
+ "post" : {
+ "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
+ "balance" : "0xd3c21bcecceda1000000",
+ "code" : "0x641234523456601f1a8001600155",
+ "nonce" : "0x00",
+ "storage" : {
+ "0x01" : "0xac"
+ }
+ }
+ },
+ "pre" : {
+ "0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
+ "balance" : "0xd3c21bcecceda1000000",
+ "code" : "0x641234523456601f1a8001600155",
+ "nonce" : "0x00",
+ "storage" : {
+ }
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/src/VMTestsFiller/vmBitwiseLogicOperation/byteBNFiller.json b/src/VMTestsFiller/vmBitwiseLogicOperation/byteBNFiller.json
new file mode 100644
index 000000000..97e5f46e7
--- /dev/null
+++ b/src/VMTestsFiller/vmBitwiseLogicOperation/byteBNFiller.json
@@ -0,0 +1,36 @@
+{
+ "byteBN": {
+ "env" : {
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
+ "currentNumber" : "0",
+ "currentGasLimit" : "1000000",
+ "currentDifficulty" : "256",
+ "currentTimestamp" : "1",
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
+ },
+ "expect" : {
+ "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
+ "storage" : {
+ "0x1" : "0xac"
+ }
+ }
+ },
+ "pre" : {
+ "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
+ "balance" : "1000000000000000000000000",
+ "nonce" : "0",
+ "code": "{ (asm 0x1234523456 31 BYTE DUP1 ADD 0x01 SSTORE )}",
+ "storage": {}
+ }
+ },
+ "exec" : {
+ "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
+ "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
+ "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
+ "value" : "1000000000000000000",
+ "data" : "",
+ "gasPrice" : "100000000000000",
+ "gas" : "100000"
+ }
+ }
+}