diff options
author | CJentzsch <jentzsch.software@gmail.com> | 2015-03-06 07:11:24 +0800 |
---|---|---|
committer | CJentzsch <jentzsch.software@gmail.com> | 2015-03-06 07:11:24 +0800 |
commit | c48082cebdb45124a9d28971a874f88b16aedb79 (patch) | |
tree | 1df3dff6edcbca3f2337423c56f3ea7161f1c8be | |
parent | 7e11889b31b9de81c6fa2ac6e430caf549c652a9 (diff) | |
download | dexon-solidity-c48082cebdb45124a9d28971a874f88b16aedb79.tar.gz dexon-solidity-c48082cebdb45124a9d28971a874f88b16aedb79.tar.zst dexon-solidity-c48082cebdb45124a9d28971a874f88b16aedb79.zip |
add quadratic complexity tests
-rw-r--r-- | state.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
@@ -169,23 +169,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) { |