aboutsummaryrefslogtreecommitdiffstats
path: root/state.cpp
diff options
context:
space:
mode:
authorCJentzsch <jentzsch.software@gmail.com>2015-02-25 05:35:15 +0800
committerCJentzsch <jentzsch.software@gmail.com>2015-02-25 21:18:55 +0800
commit296e917a6a177ce27f832936887fb154a787e6b9 (patch)
tree0e942452f4a190da5c0b53f147a739fa464acd11 /state.cpp
parent4c3e1f7c4a56bcc2cc216e15fa05522e762f1d0e (diff)
downloaddexon-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.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/state.cpp b/state.cpp
index 4e955df4..6c76a09d 100644
--- a/state.cpp
+++ b/state.cpp
@@ -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)