diff options
author | artur-zawlocki <artur.zawlocki@gmail.com> | 2014-10-31 22:47:16 +0800 |
---|---|---|
committer | artur-zawlocki <artur.zawlocki@gmail.com> | 2014-10-31 22:47:16 +0800 |
commit | f19bc2cfef4e01773447f3bc1589c11ea5accaa3 (patch) | |
tree | e38780a8d679ccae9a3dfb2914ae10989e24d393 /vm.cpp | |
parent | 609d4600255b7d9273995182d2a6148d208398a4 (diff) | |
download | dexon-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.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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; |