diff options
author | CJentzsch <jentzsch.software@gmail.com> | 2015-04-17 15:03:10 +0800 |
---|---|---|
committer | CJentzsch <jentzsch.software@gmail.com> | 2015-04-17 15:03:10 +0800 |
commit | aadffe35540d446a5723768abbe41ef841a98de6 (patch) | |
tree | 24e50774fe43dae51a95121909aa4bb5dc3b97fd /state.cpp | |
parent | 3d199bf4d50206077c0d84122ff0ef70fc174d10 (diff) | |
parent | 0f9b0f3bc4fbebb2ab956f0178ec82442065b1bc (diff) | |
download | dexon-solidity-aadffe35540d446a5723768abbe41ef841a98de6.tar dexon-solidity-aadffe35540d446a5723768abbe41ef841a98de6.tar.gz dexon-solidity-aadffe35540d446a5723768abbe41ef841a98de6.tar.bz2 dexon-solidity-aadffe35540d446a5723768abbe41ef841a98de6.tar.lz dexon-solidity-aadffe35540d446a5723768abbe41ef841a98de6.tar.xz dexon-solidity-aadffe35540d446a5723768abbe41ef841a98de6.tar.zst dexon-solidity-aadffe35540d446a5723768abbe41ef841a98de6.zip |
Merge remote-tracking branch 'upstream/develop' into addTests
Conflicts:
test/bcUncleHeaderValiditiyFiller.json
Diffstat (limited to 'state.cpp')
-rw-r--r-- | state.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
@@ -91,23 +91,9 @@ void doStateTests(json_spirit::mValue& v, bool _fillin) // check addresses #if ETH_FATDB + ImportTest::checkExpectedState(importer.m_statePost, theState); auto expectedAddrs = importer.m_statePost.addresses(); auto resultAddrs = theState.addresses(); - for (auto& expectedPair : expectedAddrs) - { - auto& expectedAddr = expectedPair.first; - auto resultAddrIt = resultAddrs.find(expectedAddr); - if (resultAddrIt == resultAddrs.end()) - BOOST_ERROR("Missing expected address " << expectedAddr); - else - { - BOOST_CHECK_MESSAGE(importer.m_statePost.balance(expectedAddr) == theState.balance(expectedAddr), expectedAddr << ": incorrect balance " << theState.balance(expectedAddr) << ", expected " << importer.m_statePost.balance(expectedAddr)); - BOOST_CHECK_MESSAGE(importer.m_statePost.transactionsFrom(expectedAddr) == theState.transactionsFrom(expectedAddr), expectedAddr << ": incorrect txCount " << theState.transactionsFrom(expectedAddr) << ", expected " << importer.m_statePost.transactionsFrom(expectedAddr)); - BOOST_CHECK_MESSAGE(importer.m_statePost.code(expectedAddr) == theState.code(expectedAddr), expectedAddr << ": incorrect code"); - - checkStorage(importer.m_statePost.storage(expectedAddr), theState.storage(expectedAddr), expectedAddr); - } - } checkAddresses<map<Address, u256> >(expectedAddrs, resultAddrs); #endif BOOST_CHECK_MESSAGE(theState.rootHash() == h256(o["postStateRoot"].get_str()), "wrong post state root"); @@ -232,6 +218,8 @@ BOOST_AUTO_TEST_CASE(stCreateTest) BOOST_AUTO_TEST_CASE(stRandom) { + test::Options::get(); // parse command line options, e.g. to enable JIT + string testPath = dev::test::getTestPath(); testPath += "/StateTests/RandomTests"; |