aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGav Wood <g@ethdev.com>2015-03-20 23:09:07 +0800
committerGav Wood <g@ethdev.com>2015-03-20 23:09:07 +0800
commit3d1364698f604ad0602ce880c7751e3003e2584b (patch)
tree343158d254534db22581b0deea3481c341e37a5e
parentff06ea3aafba6292af797eb5d08d80a97d65ede7 (diff)
parent0f0929b7f7dafd49f0a1ce9b99040ee2043cea08 (diff)
downloaddexon-solidity-3d1364698f604ad0602ce880c7751e3003e2584b.tar
dexon-solidity-3d1364698f604ad0602ce880c7751e3003e2584b.tar.gz
dexon-solidity-3d1364698f604ad0602ce880c7751e3003e2584b.tar.bz2
dexon-solidity-3d1364698f604ad0602ce880c7751e3003e2584b.tar.lz
dexon-solidity-3d1364698f604ad0602ce880c7751e3003e2584b.tar.xz
dexon-solidity-3d1364698f604ad0602ce880c7751e3003e2584b.tar.zst
dexon-solidity-3d1364698f604ad0602ce880c7751e3003e2584b.zip
Merge pull request #1359 from winsvega/develop
SDIV
-rw-r--r--blockchain.cpp4
-rw-r--r--vmArithmeticTestFiller.json142
2 files changed, 143 insertions, 3 deletions
diff --git a/blockchain.cpp b/blockchain.cpp
index 5ad39549..0f5eeaee 100644
--- a/blockchain.cpp
+++ b/blockchain.cpp
@@ -653,9 +653,9 @@ BOOST_AUTO_TEST_CASE(bcUncleTest)
dev::test::executeTests("bcUncleTest", "/BlockTests", dev::test::doBlockchainTests);
}
-BOOST_AUTO_TEST_CASE(userDefinedFileBc)
+BOOST_AUTO_TEST_CASE(userDefinedFile)
{
- dev::test::userDefinedTest("--bctest", dev::test::doBlockchainTests);
+ dev::test::userDefinedTest("--singletest", dev::test::doBlockchainTests);
}
BOOST_AUTO_TEST_SUITE_END()
diff --git a/vmArithmeticTestFiller.json b/vmArithmeticTestFiller.json
index df3fa84f..1af2964f 100644
--- a/vmArithmeticTestFiller.json
+++ b/vmArithmeticTestFiller.json
@@ -925,6 +925,146 @@
}
},
+ "sdiv5": {
+ "env" : {
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
+ "currentNumber" : "0",
+ "currentGasLimit" : "1000000",
+ "currentDifficulty" : "256",
+ "currentTimestamp" : "1",
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
+ },
+ "pre" : {
+ "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
+ "balance" : "1000000000000000000",
+ "nonce" : "0",
+ "code" : "{ [[ 0 ]] (SDIV (- 0 57896044618658097711785492504343953926634992332820282019728792003956564819968) (- 0 1) ) }",
+ "storage": {}
+ }
+ },
+ "exec" : {
+ "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
+ "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
+ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
+ "value" : "1000000000000000000",
+ "data" : "",
+ "gasPrice" : "100000000000000",
+ "gas" : "100000"
+ }
+ },
+
+ "sdiv6": {
+ "env" : {
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
+ "currentNumber" : "0",
+ "currentGasLimit" : "1000000",
+ "currentDifficulty" : "256",
+ "currentTimestamp" : "1",
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
+ },
+ "pre" : {
+ "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
+ "balance" : "1000000000000000000",
+ "nonce" : "0",
+ "code" : "{ [[ 0 ]] (SDIV (- 0 57896044618658097711785492504343953926634992332820282019728792003956564819968) 0 ) }",
+ "storage": {}
+ }
+ },
+ "exec" : {
+ "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
+ "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
+ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
+ "value" : "1000000000000000000",
+ "data" : "",
+ "gasPrice" : "100000000000000",
+ "gas" : "100000"
+ }
+ },
+
+ "sdiv7": {
+ "env" : {
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
+ "currentNumber" : "0",
+ "currentGasLimit" : "1000000",
+ "currentDifficulty" : "256",
+ "currentTimestamp" : "1",
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
+ },
+ "pre" : {
+ "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
+ "balance" : "1000000000000000000",
+ "nonce" : "0",
+ "code" : "{ [[ 0 ]] (SDIV (- 0 1) 25 ) }",
+ "storage": {}
+ }
+ },
+ "exec" : {
+ "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
+ "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
+ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
+ "value" : "1000000000000000000",
+ "data" : "",
+ "gasPrice" : "100000000000000",
+ "gas" : "100000"
+ }
+ },
+
+ "sdiv8": {
+ "env" : {
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
+ "currentNumber" : "0",
+ "currentGasLimit" : "1000000",
+ "currentDifficulty" : "256",
+ "currentTimestamp" : "1",
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
+ },
+ "pre" : {
+ "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
+ "balance" : "1000000000000000000",
+ "nonce" : "0",
+ "code" : "{ [[ 0 ]] (SDIV (- 0 1) (- 0 1)) }",
+ "storage": {}
+ }
+ },
+ "exec" : {
+ "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
+ "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
+ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
+ "value" : "1000000000000000000",
+ "data" : "",
+ "gasPrice" : "100000000000000",
+ "gas" : "100000"
+ }
+ },
+
+ "sdiv9": {
+ "env" : {
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
+ "currentNumber" : "0",
+ "currentGasLimit" : "1000000",
+ "currentDifficulty" : "256",
+ "currentTimestamp" : "1",
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
+ },
+ "pre" : {
+ "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
+ "balance" : "1000000000000000000",
+ "nonce" : "0",
+ "code" : "{ [[ 0 ]] (SDIV (- 0 1) 1) }",
+ "storage": {}
+ }
+ },
+ "exec" : {
+ "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
+ "origin" : "cd1722f2947def4cf144679da39c4c32bdc35681",
+ "caller" : "cd1722f2947def4cf144679da39c4c32bdc35681",
+ "value" : "1000000000000000000",
+ "data" : "",
+ "gasPrice" : "100000000000000",
+ "gas" : "100000"
+ }
+ },
+
"sdiv_i256min": {
"env" : {
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
@@ -977,7 +1117,7 @@
"value" : "1000000000000000000",
"data" : "",
"gasPrice" : "100000000000000",
- "gas" : "10000"
+ "gas" : "100000"
}
},