aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGav Wood <g@ethdev.com>2015-03-11 03:08:21 +0800
committerGav Wood <g@ethdev.com>2015-03-11 03:08:21 +0800
commite9db858ccabbdaa90ed721065b7ace48d3e34bd5 (patch)
tree697606f2fec10bb05920947b8257da3901026fcc
parentbf01fe780472ea53ce6854881cfab289011aeeb2 (diff)
parenta0134203972c245a539671631f84d8f04216aa33 (diff)
downloaddexon-solidity-e9db858ccabbdaa90ed721065b7ace48d3e34bd5.tar.gz
dexon-solidity-e9db858ccabbdaa90ed721065b7ace48d3e34bd5.tar.zst
dexon-solidity-e9db858ccabbdaa90ed721065b7ace48d3e34bd5.zip
Merge pull request #1247 from CJentzsch/addInputLimitTests
add input limit tests
-rw-r--r--vm.cpp64
1 files changed, 37 insertions, 27 deletions
diff --git a/vm.cpp b/vm.cpp
index eb7c174e..a39f0005 100644
--- a/vm.cpp
+++ b/vm.cpp
@@ -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)
{