aboutsummaryrefslogtreecommitdiffstats
path: root/state.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-04-15 23:43:23 +0800
committerchriseth <c@ethdev.com>2015-04-15 23:43:23 +0800
commit6753e0a8e6796e99ee826c28c7bcbde55348b07d (patch)
treefdcb51c9c0b26aab635680ff2f2cb330cf4f4bd2 /state.cpp
parentc19d10321a116bec4ed08aabf3b3c8d74bf61608 (diff)
parentc5f08fe6dff58f973da8b888d25afa3ef967936e (diff)
downloaddexon-solidity-6753e0a8e6796e99ee826c28c7bcbde55348b07d.tar
dexon-solidity-6753e0a8e6796e99ee826c28c7bcbde55348b07d.tar.gz
dexon-solidity-6753e0a8e6796e99ee826c28c7bcbde55348b07d.tar.bz2
dexon-solidity-6753e0a8e6796e99ee826c28c7bcbde55348b07d.tar.lz
dexon-solidity-6753e0a8e6796e99ee826c28c7bcbde55348b07d.tar.xz
dexon-solidity-6753e0a8e6796e99ee826c28c7bcbde55348b07d.tar.zst
dexon-solidity-6753e0a8e6796e99ee826c28c7bcbde55348b07d.zip
Merge remote-tracking branch 'ethereum/develop' into sol_overloadingFunctions
Conflicts: libsolidity/Types.cpp
Diffstat (limited to 'state.cpp')
-rw-r--r--state.cpp18
1 files changed, 3 insertions, 15 deletions
diff --git a/state.cpp b/state.cpp
index e4bf06bd..65f33353 100644
--- a/state.cpp
+++ b/state.cpp
@@ -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";