diff options
author | CJentzsch <jentzsch.software@gmail.com> | 2015-03-06 07:11:24 +0800 |
---|---|---|
committer | Gav Wood <i@gavwood.com> | 2015-03-06 19:49:38 +0800 |
commit | d449b1704fe8ef497dce8cc3e7598615acfa3ffc (patch) | |
tree | ceab1cdf5e8c338f63fa0fb9e22546a18f884ecf | |
parent | 937c8a35c1491465ba8adf67e4e39d63fb2904fc (diff) | |
download | dexon-solidity-d449b1704fe8ef497dce8cc3e7598615acfa3ffc.tar.gz dexon-solidity-d449b1704fe8ef497dce8cc3e7598615acfa3ffc.tar.zst dexon-solidity-d449b1704fe8ef497dce8cc3e7598615acfa3ffc.zip |
add quadratic complexity tests
-rw-r--r-- | state.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
@@ -170,23 +170,23 @@ BOOST_AUTO_TEST_CASE(stBlockHashTest) dev::test::executeTests("stBlockHashTest", "/StateTests", dev::test::doStateTests); } -//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<chrono::milliseconds>(end - start)); -// cnote << "test duration: " << duration.count() << " milliseconds.\n"; -// } -// } -//} +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<chrono::milliseconds>(end - start)); + cnote << "test duration: " << duration.count() << " milliseconds.\n"; + } + } +} BOOST_AUTO_TEST_CASE(stMemoryStressTest) { |