From 4c3e1f7c4a56bcc2cc216e15fa05522e762f1d0e Mon Sep 17 00:00:00 2001 From: CJentzsch Date: Tue, 24 Feb 2015 19:39:47 +0100 Subject: add test for quadratic complexity remove file with wrong name --- state.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'state.cpp') diff --git a/state.cpp b/state.cpp index 03f01d0f..4e955df4 100644 --- a/state.cpp +++ b/state.cpp @@ -159,6 +159,11 @@ BOOST_AUTO_TEST_CASE(stBlockHashTest) dev::test::executeTests("stBlockHashTest", "/StateTests", dev::test::doStateTests); } +BOOST_AUTO_TEST_CASE(stQuadraticComplexityTest) +{ + dev::test::executeTests("stQuadraticComplexityTest", "/StateTests", dev::test::doStateTests); +} + BOOST_AUTO_TEST_CASE(stSolidityTest) { dev::test::executeTests("stSolidityTest", "/StateTests", dev::test::doStateTests); -- cgit From 296e917a6a177ce27f832936887fb154a787e6b9 Mon Sep 17 00:00:00 2001 From: CJentzsch Date: Tue, 24 Feb 2015 22:35:15 +0100 Subject: add quadratic complexity tests --- state.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'state.cpp') 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(end - start)); + cnote << "test duration: " << duration.count() << " milliseconds.\n"; + } + } } BOOST_AUTO_TEST_CASE(stSolidityTest) -- cgit From 24574ef3374cf6ce3a9b473649ebe84be6084c35 Mon Sep 17 00:00:00 2001 From: CJentzsch Date: Wed, 25 Feb 2015 12:59:23 +0100 Subject: add memory tests --- state.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'state.cpp') diff --git a/state.cpp b/state.cpp index 6c76a09d..8872d985 100644 --- a/state.cpp +++ b/state.cpp @@ -182,6 +182,11 @@ 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); +} + BOOST_AUTO_TEST_CASE(stCreateTest) { for (int i = 1; i < boost::unit_test::framework::master_test_suite().argc; ++i) -- cgit