diff options
author | Paweł Bylica <pawel.bylica@imapp.pl> | 2014-12-15 22:11:35 +0800 |
---|---|---|
committer | Paweł Bylica <pawel.bylica@imapp.pl> | 2014-12-15 22:11:35 +0800 |
commit | 59fe1fdf9294feab37999e386784f80e390e9001 (patch) | |
tree | 5aa61d98891fd5e944a72f754ef6710740b5b13f /TestHelper.cpp | |
parent | a9b5c1b9cab3aee23b2df8f260ed935b36de257d (diff) | |
parent | dd309de94c2cd6a5d77be877e4f30b5a70d725f5 (diff) | |
download | dexon-solidity-59fe1fdf9294feab37999e386784f80e390e9001.tar.gz dexon-solidity-59fe1fdf9294feab37999e386784f80e390e9001.tar.zst dexon-solidity-59fe1fdf9294feab37999e386784f80e390e9001.zip |
Merge commit '1b8f9fdc3b44503890ed1bcb5da8bd5cb8dd83a5' into develop-evmcc
Conflicts:
test/TestHelper.cpp
Diffstat (limited to 'TestHelper.cpp')
-rw-r--r-- | TestHelper.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/TestHelper.cpp b/TestHelper.cpp index 6f7bf31d..d0100db6 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -110,9 +110,6 @@ void ImportTest::importState(json_spirit::mObject& _o, State& _state) Address address = Address(i.first); - for (auto const& j: o["storage"].get_obj()) - _state.setStorage(address, toInt(j.first), toInt(j.second)); - bytes code = importCode(o); if (code.size()) @@ -123,6 +120,9 @@ void ImportTest::importState(json_spirit::mObject& _o, State& _state) else _state.m_cache[address] = Account(toInt(o["balance"]), Account::NormalCreation); + for (auto const& j: o["storage"].get_obj()) + _state.setStorage(address, toInt(j.first), toInt(j.second)); + for(int i=0; i<toInt(o["nonce"]); ++i) _state.noteSending(address); @@ -330,12 +330,10 @@ void checkStorage(map<u256, u256> _expectedStore, map<u256, u256> _resultStore, BOOST_CHECK_MESSAGE(expectedStoreValue == resultStoreValue, _expectedAddr << ": store[" << expectedStoreKey << "] = " << resultStoreValue << ", expected " << expectedStoreValue); } } - - for (auto&& resultStorePair : _resultStore) - { - if (!_expectedStore.count(resultStorePair.first)) - BOOST_ERROR("unexpected result store key " << resultStorePair.first); - } + BOOST_CHECK_EQUAL(_resultStore.size(), _expectedStore.size()); + for (auto&& resultStorePair : _resultStore) + if (!_expectedStore.count(resultStorePair.first)) + BOOST_ERROR(_expectedAddr << ": unexpected store key " << resultStorePair.first); } void checkLog(LogEntries _resultLogs, LogEntries _expectedLogs) |