aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Jentzsch <jentzsch.software@gmail.com>2014-10-23 03:21:18 +0800
committerChristoph Jentzsch <jentzsch.software@gmail.com>2014-10-23 03:21:18 +0800
commit52e3b15735a71ed527d538b82ba135bd9c29d18e (patch)
tree11a797713192ac85905d17726a64f908f82b5941
parent76c29fc08addfd4cffa1773def96833f3616b4c0 (diff)
downloaddexon-solidity-52e3b15735a71ed527d538b82ba135bd9c29d18e.tar.gz
dexon-solidity-52e3b15735a71ed527d538b82ba135bd9c29d18e.tar.zst
dexon-solidity-52e3b15735a71ed527d538b82ba135bd9c29d18e.zip
Added call depth tests
-rw-r--r--vm.cpp2
-rw-r--r--vmIOandFlowOperationsTestFiller.json28
-rw-r--r--vmSystemOperationsTestFiller.json71
3 files changed, 100 insertions, 1 deletions
diff --git a/vm.cpp b/vm.cpp
index 0ac21156..fd23829f 100644
--- a/vm.cpp
+++ b/vm.cpp
@@ -24,7 +24,7 @@
#include <libdevcore/CommonIO.h>
#include <boost/filesystem/path.hpp>
-//#define FILL_TESTS
+#define FILL_TESTS
using namespace std;
using namespace json_spirit;
diff --git a/vmIOandFlowOperationsTestFiller.json b/vmIOandFlowOperationsTestFiller.json
index 79d162c8..a470b9c8 100644
--- a/vmIOandFlowOperationsTestFiller.json
+++ b/vmIOandFlowOperationsTestFiller.json
@@ -670,6 +670,34 @@
}
},
+ "jumpi2": {
+ "env" : {
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
+ "currentNumber" : "0",
+ "currentGasLimit" : "1000000",
+ "currentDifficulty" : "256",
+ "currentTimestamp" : 1,
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
+ },
+ "pre" : {
+ "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
+ "balance" : "1000000000000000000",
+ "nonce" : 0,
+ "code" : "0x60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff596002600357",
+ "storage": {}
+ }
+ },
+ "exec" : {
+ "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
+ "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
+ "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
+ "value" : "1000000000000000000",
+ "data" : "",
+ "gasPrice" : "100000000000000",
+ "gas" : "10000"
+ }
+ },
+
"pc0": {
"env" : {
"previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
diff --git a/vmSystemOperationsTestFiller.json b/vmSystemOperationsTestFiller.json
index c948f043..c0dae74d 100644
--- a/vmSystemOperationsTestFiller.json
+++ b/vmSystemOperationsTestFiller.json
@@ -949,6 +949,77 @@
}
},
+ "ABAcalls2": {
+ "env" : {
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
+ "currentNumber" : "0",
+ "currentGasLimit" : "10000000",
+ "currentDifficulty" : "256",
+ "currentTimestamp" : 1,
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
+ },
+ "pre" : {
+ "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
+ "balance" : "1000000000000000000",
+ "nonce" : 0,
+ "code" : "{ [[ 0 ]] (ADD (SLOAD 0) 1) (CALL (- (GAS) 1000) 0x945304eb96065b2a98b57a48a06ae28d285a71b5 1 0 0 0 0) }",
+ "storage": {}
+ },
+ "945304eb96065b2a98b57a48a06ae28d285a71b5" : {
+ "balance" : "0",
+ "code" : " { [[ 0 ]] (ADD (SLOAD 0) 1) (CALL (- (GAS) 1000) 0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6 0 0 0 0 0) } ",
+ "nonce" : "0",
+ "storage" : {
+ }
+ }
+
+ },
+ "exec" : {
+ "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
+ "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
+ "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
+ "value" : "100000",
+ "data" : "",
+ "gasPrice" : "100000000000000",
+ "gas" : "10000000000000"
+ }
+ },
+
+ "ABAcalls3": {
+ "env" : {
+ "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6",
+ "currentNumber" : "0",
+ "currentGasLimit" : "10000000",
+ "currentDifficulty" : "256",
+ "currentTimestamp" : 1,
+ "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"
+ },
+ "pre" : {
+ "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6" : {
+ "balance" : "1025000",
+ "nonce" : 0,
+ "code" : "{ [[ 0 ]] (ADD (SLOAD 0) 1) (CALL (- (GAS) 1000) 0x945304eb96065b2a98b57a48a06ae28d285a71b5 1 0 0 0 0) }",
+ "storage": {}
+ },
+ "945304eb96065b2a98b57a48a06ae28d285a71b5" : {
+ "balance" : "0",
+ "code" : " { [[ 0 ]] (ADD (SLOAD 0) 1) (CALL (- (GAS) 1000) 0x0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6 0 0 0 0 0) } ",
+ "nonce" : "0",
+ "storage" : {
+ }
+ }
+
+ },
+ "exec" : {
+ "address" : "0f572e5295c57f15886f9b263e2f6d2d6c7b5ec6",
+ "origin" : "cd1722f3947def4cf144679da39c4c32bdc35681",
+ "caller" : "cd1722f3947def4cf144679da39c4c32bdc35681",
+ "value" : "100000",
+ "data" : "",
+ "gasPrice" : "100000000000000",
+ "gas" : "1000000"
+ }
+ },
"ABAcallsSuicide0": {
"env" : {