diff options
author | CJentzsch <jentzsch.software@gmail.com> | 2015-02-25 05:35:15 +0800 |
---|---|---|
committer | CJentzsch <jentzsch.software@gmail.com> | 2015-02-25 21:18:55 +0800 |
commit | 296e917a6a177ce27f832936887fb154a787e6b9 (patch) | |
tree | 0e942452f4a190da5c0b53f147a739fa464acd11 /state.cpp | |
parent | 4c3e1f7c4a56bcc2cc216e15fa05522e762f1d0e (diff) | |
download | dexon-solidity-296e917a6a177ce27f832936887fb154a787e6b9.tar.gz dexon-solidity-296e917a6a177ce27f832936887fb154a787e6b9.tar.zst dexon-solidity-296e917a6a177ce27f832936887fb154a787e6b9.zip |
add quadratic complexity tests
Diffstat (limited to 'state.cpp')
-rw-r--r-- | state.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -161,7 +161,20 @@ BOOST_AUTO_TEST_CASE(stBlockHashTest) BOOST_AUTO_TEST_CASE(stQuadraticComplexityTest) { - dev::test::executeTests("stQuadraticComplexityTest", "/StateTests", dev::test::doStateTests); + 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(stSolidityTest) |