aboutsummaryrefslogtreecommitdiffstats
path: root/vm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vm.cpp')
-rw-r--r--vm.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/vm.cpp b/vm.cpp
index 102de7c4..3fe12dc1 100644
--- a/vm.cpp
+++ b/vm.cpp
@@ -535,7 +535,9 @@ void doTests(json_spirit::mValue& v, bool _fillin)
auto argc = boost::unit_test::framework::master_test_suite().argc;
auto argv = boost::unit_test::framework::master_test_suite().argv;
- auto useJit = argc >= 2 && std::string(argv[1]) == "--jit";
+ auto useJit = false;
+ for (auto i = 0; i < argc && !useJit; ++i)
+ useJit |= std::string(argv[i]) == "--jit";
auto vmKind = useJit ? VMFace::JIT : VMFace::Interpreter;
dev::test::FakeExtVM fev;
@@ -585,8 +587,8 @@ void doTests(json_spirit::mValue& v, bool _fillin)
cnote << "Execution time: "
<< std::chrono::duration_cast<std::chrono::milliseconds>(testDuration).count()
<< " ms";
+ break;
}
- break;
}
auto gas = vm->gas();
@@ -826,7 +828,7 @@ BOOST_AUTO_TEST_CASE(vmSystemOperationsTest)
BOOST_AUTO_TEST_CASE(userDefinedFile)
{
- if (boost::unit_test::framework::master_test_suite().argc == 2)
+ if (boost::unit_test::framework::master_test_suite().argc >= 2)
{
string filename = boost::unit_test::framework::master_test_suite().argv[1];
int currentVerbosity = g_logVerbosity;