aboutsummaryrefslogtreecommitdiffstats
path: root/vm.cpp
diff options
context:
space:
mode:
authorartur-zawlocki <artur.zawlocki@gmail.com>2014-10-31 22:47:16 +0800
committerartur-zawlocki <artur.zawlocki@gmail.com>2014-10-31 22:47:16 +0800
commitf19bc2cfef4e01773447f3bc1589c11ea5accaa3 (patch)
treee38780a8d679ccae9a3dfb2914ae10989e24d393 /vm.cpp
parent609d4600255b7d9273995182d2a6148d208398a4 (diff)
downloaddexon-solidity-f19bc2cfef4e01773447f3bc1589c11ea5accaa3.tar
dexon-solidity-f19bc2cfef4e01773447f3bc1589c11ea5accaa3.tar.gz
dexon-solidity-f19bc2cfef4e01773447f3bc1589c11ea5accaa3.tar.bz2
dexon-solidity-f19bc2cfef4e01773447f3bc1589c11ea5accaa3.tar.lz
dexon-solidity-f19bc2cfef4e01773447f3bc1589c11ea5accaa3.tar.xz
dexon-solidity-f19bc2cfef4e01773447f3bc1589c11ea5accaa3.tar.zst
dexon-solidity-f19bc2cfef4e01773447f3bc1589c11ea5accaa3.zip
allow --jit as non first argument
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;