diff options
author | CJentzsch <jentzsch.software@gmail.com> | 2015-03-09 23:44:23 +0800 |
---|---|---|
committer | CJentzsch <jentzsch.software@gmail.com> | 2015-03-09 23:44:23 +0800 |
commit | a0134203972c245a539671631f84d8f04216aa33 (patch) | |
tree | d1424c8650a588445ad45f81d92e692de952f025 /vm.cpp | |
parent | d586a88f3cab21db88f31dd574daac4bb9a28b7d (diff) | |
download | dexon-solidity-a0134203972c245a539671631f84d8f04216aa33.tar.gz dexon-solidity-a0134203972c245a539671631f84d8f04216aa33.tar.zst dexon-solidity-a0134203972c245a539671631f84d8f04216aa33.zip |
add input limit tests
Diffstat (limited to 'vm.cpp')
-rw-r--r-- | vm.cpp | 64 |
1 files changed, 37 insertions, 27 deletions
@@ -533,33 +533,43 @@ BOOST_AUTO_TEST_CASE(vmPerformanceTest) } } -//BOOST_AUTO_TEST_CASE(vmInputLimitsTest1) -//{ -// 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 == "--inputlimits" || arg == "--all") -// { -// auto start = chrono::steady_clock::now(); - -// dev::test::executeTests("vmInputLimitsTest1", "/VMTests", dev::test::doVMTests); - -// 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(vmInputLimitsTest2) -//{ -// 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 == "--inputlimits" || arg == "--all") -// dev::test::executeTests("vmInputLimitsTest2", "/VMTests", dev::test::doVMTests); -// } -//} +BOOST_AUTO_TEST_CASE(vmInputLimitsTest1) +{ + 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 == "--inputlimits" || arg == "--all") + { + auto start = chrono::steady_clock::now(); + + dev::test::executeTests("vmInputLimits1", "/VMTests", dev::test::doVMTests); + + 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(vmInputLimitsTest2) +{ + 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 == "--inputlimits" || arg == "--all") + dev::test::executeTests("vmInputLimits2", "/VMTests", dev::test::doVMTests); + } +} + +BOOST_AUTO_TEST_CASE(vmInputLimitsLightTest) +{ + 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 == "--inputlimits" || arg == "--all") + dev::test::executeTests("vmInputLimitsLight", "/VMTests", dev::test::doVMTests); + } +} BOOST_AUTO_TEST_CASE(vmRandom) { |