diff --git a/test/TestHelper.cpp b/test/TestHelper.cpp index 82add295e..104c03f2c 100644 --- a/test/TestHelper.cpp +++ b/test/TestHelper.cpp @@ -205,6 +205,8 @@ void ImportTest::exportTest(bytes const& _output, State const& _statePost) } m_TestObject["post"] = json_spirit::mValue(postState); + m_TestObject["postStateRoot"] = toHex(_statePost.rootHash().asBytes()); + // export pre state json_spirit::mObject preState; diff --git a/test/stMemoryTestFiller.json b/test/stMemoryTestFiller.json index e2b3b95a0..eac2d5875 100644 --- a/test/stMemoryTestFiller.json +++ b/test/stMemoryTestFiller.json @@ -1459,7 +1459,5 @@ "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", "data" : "0xff55883355001144bbccddffeeaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" } - }, - - + } } diff --git a/test/state.cpp b/test/state.cpp index 72eda1a10..612e44e6a 100644 --- a/test/state.cpp +++ b/test/state.cpp @@ -92,7 +92,6 @@ void doStateTests(json_spirit::mValue& v, bool _fillin) // check addresses #if ETH_FATDB - cout << "fatDB is defined\n"; auto expectedAddrs = importer.m_statePost.addresses(); auto resultAddrs = theState.addresses(); for (auto& expectedPair : expectedAddrs) @@ -172,50 +171,51 @@ BOOST_AUTO_TEST_CASE(stBlockHashTest) BOOST_AUTO_TEST_CASE(stQuadraticComplexityTest) { - for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i) - { - string arg = boost::unit_test::framework::master_test_suite().argv[i]; - if (arg == "--quadratic" || arg == "--all") - { - auto start = chrono::steady_clock::now(); - - dev::test::executeTests("stQuadraticComplexityTest", "/StateTests", dev::test::doStateTests); - - auto end = chrono::steady_clock::now(); - auto duration(chrono::duration_cast(end - start)); - cnote << "test duration: " << duration.count() << " milliseconds.\n"; - } - } + for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i) + { + string arg = boost::unit_test::framework::master_test_suite().argv[i]; + if (arg == "--quadratic" || arg == "--all") + { + auto start = chrono::steady_clock::now(); + + dev::test::executeTests("stQuadraticComplexityTest", "/StateTests", dev::test::doStateTests); + + auto end = chrono::steady_clock::now(); + auto duration(chrono::duration_cast(end - start)); + cnote << "test duration: " << duration.count() << " milliseconds.\n"; + } + } } BOOST_AUTO_TEST_CASE(stMemoryStressTest) { - for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i) - { - string arg = boost::unit_test::framework::master_test_suite().argv[i]; - if (arg == "--memory" || arg == "--all") - { - auto start = chrono::steady_clock::now(); - - dev::test::executeTests("stMemoryStressTest", "/StateTests", dev::test::doStateTests); - - auto end = chrono::steady_clock::now(); - auto duration(chrono::duration_cast(end - start)); - cnote << "test duration: " << duration.count() << " milliseconds.\n"; - } - } + for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i) + { + string arg = boost::unit_test::framework::master_test_suite().argv[i]; + if (arg == "--memory" || arg == "--all") + { + auto start = chrono::steady_clock::now(); + + dev::test::executeTests("stMemoryStressTest", "/StateTests", dev::test::doStateTests); + + auto end = chrono::steady_clock::now(); + auto duration(chrono::duration_cast(end - start)); + cnote << "test duration: " << duration.count() << " milliseconds.\n"; + } + } } -BOOST_AUTO_TEST_CASE(stSolidityTest) -{ - dev::test::executeTests("stSolidityTest", "/StateTests", dev::test::doStateTests); -} + BOOST_AUTO_TEST_CASE(stSolidityTest) + { + dev::test::executeTests("stSolidityTest", "/StateTests", dev::test::doStateTests); + } BOOST_AUTO_TEST_CASE(stMemoryTest) { - dev::test::executeTests("stMemoryTest", "/StateTests", dev::test::doStateTests); + dev::test::executeTests("stMemoryTest", "/StateTests", dev::test::doStateTests); } + BOOST_AUTO_TEST_CASE(stCreateTest) { for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i)