aboutsummaryrefslogtreecommitdiffstats
path: root/src/GeneralStateTestsFiller/stSolidityTest/TestStructuresAndVariablessFiller.json
diff options
context:
space:
mode:
authorDimitry <winsvega@mail.ru>2016-12-09 22:17:42 +0800
committerDimitry <winsvega@mail.ru>2016-12-09 22:17:42 +0800
commitd350f5c96a1fb253d2a271c96d2051eb311737f4 (patch)
treeda87715fd38b26e408f6a0dd78777c9368de0db6 /src/GeneralStateTestsFiller/stSolidityTest/TestStructuresAndVariablessFiller.json
parentdf97106322e39ced3007bb3fee6b96003c791b5a (diff)
downloadtangerine-tests-d350f5c96a1fb253d2a271c96d2051eb311737f4.tar
tangerine-tests-d350f5c96a1fb253d2a271c96d2051eb311737f4.tar.gz
tangerine-tests-d350f5c96a1fb253d2a271c96d2051eb311737f4.tar.bz2
tangerine-tests-d350f5c96a1fb253d2a271c96d2051eb311737f4.tar.lz
tangerine-tests-d350f5c96a1fb253d2a271c96d2051eb311737f4.tar.xz
tangerine-tests-d350f5c96a1fb253d2a271c96d2051eb311737f4.tar.zst
tangerine-tests-d350f5c96a1fb253d2a271c96d2051eb311737f4.zip
upgrade eip158 to general tests
Diffstat (limited to 'src/GeneralStateTestsFiller/stSolidityTest/TestStructuresAndVariablessFiller.json')
-rw-r--r--src/GeneralStateTestsFiller/stSolidityTest/TestStructuresAndVariablessFiller.json48
1 files changed, 45 insertions, 3 deletions
diff --git a/src/GeneralStateTestsFiller/stSolidityTest/TestStructuresAndVariablessFiller.json b/src/GeneralStateTestsFiller/stSolidityTest/TestStructuresAndVariablessFiller.json
index 509b43969..b0531b526 100644
--- a/src/GeneralStateTestsFiller/stSolidityTest/TestStructuresAndVariablessFiller.json
+++ b/src/GeneralStateTestsFiller/stSolidityTest/TestStructuresAndVariablessFiller.json
@@ -15,7 +15,7 @@
"gas" : -1,
"value" : -1
},
- "network" : "Frontier",
+ "network" : ["ALL"],
"result" : {
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
"storage" : {
@@ -32,8 +32,50 @@
],
"pre" : {
"095e7baea6a6c7c4c2dfeb977efac326af552d87" : {
- "//" : "}\t\t\t\t\t\t\t\t\t\t\t",
"balance" : "100000",
+ "//" : "contract main ",
+ "//" : "{ ",
+ "//" : " struct StructTest ",
+ "//" : " { ",
+ "//" : " address addr; ",
+ "//" : " int amount; ",
+ "//" : " bytes32 str; ",
+ "//" : " mapping (uint => address) funders; ",
+ "//" : " } ",
+ "//" : " ",
+ "//" : " bool returnValue; ",
+ "//" : " int globalValue; ",
+ "//" : " StructTest globalData; ",
+ "//" : " function run() returns (bool) ",
+ "//" : " { ",
+ "//" : " globalValue = 255; ",
+ "//" : " globalData.addr = 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b; ",
+ "//" : " globalData.amount = 255; ",
+ "//" : " globalData.str = 'global data 32 length string'; ",
+ "//" : " globalData.funders[0] = 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b; ",
+ "//" : " returnValue = testStructuresAndVariabless(); ",
+ "//" : " return returnValue; ",
+ "//" : " } ",
+ "//" : " ",
+ "//" : " function testStructuresAndVariabless() returns (bool res) ",
+ "//" : " { ",
+ "//" : " res = true; ",
+ "//" : " if (globalValue != 255) ",
+ "//" : " return false; ",
+ "//" : " ",
+ "//" : " if (globalValue != globalData.amount) ",
+ "//" : " return false; ",
+ "//" : " ",
+ "//" : " if (globalData.addr != 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b) ",
+ "//" : " return false; ",
+ "//" : " ",
+ "//" : " if (globalData.str != 'global data 32 length string') ",
+ "//" : " return false; ",
+ "//" : " ",
+ "//" : " if (globalData.funders[0] != 0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b) ",
+ "//" : " return false; ",
+ "//" : " } ",
+ "//" : "} ",
"code" : "0x7c010000000000000000000000000000000000000000000000000000000060003504632a9afb838114610039578063c04062261461004b57005b61004161005d565b8060005260206000f35b61005361016c565b8060005260206000f35b600160ff8154141561006e57610076565b506000610169565b60015460035414156100875761008f565b506000610169565b73a94f5374fce5edbc8e2a8697c15331677e6ebf0b73ffffffffffffffffffffffffffffffffffffffff60016002540481161614156100cd576100d5565b506000610169565b7f676c6f62616c2064617461203332206c656e67746820737472696e670000000060045414156101045761010c565b506000610169565b6005600080815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673a94f5374fce5edbc8e2a8697c15331677e6ebf0b141561016057610168565b506000610169565b5b90565b600060ff806001555073a94f5374fce5edbc8e2a8697c15331677e6ebf0b6002805473ffffffffffffffffffffffffffffffffffffffff1916821790555060ff80600355507f676c6f62616c2064617461203332206c656e67746820737472696e6700000000806004555073a94f5374fce5edbc8e2a8697c15331677e6ebf0b6005600080815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555061022f61005d565b600060006101000a81548160ff0219169083021790555060ff6001600054041690509056",
"nonce" : "0",
"storage" : {
@@ -63,4 +105,4 @@
]
}
}
-} \ No newline at end of file
+}