aboutsummaryrefslogtreecommitdiffstats
path: root/vm.cpp
diff options
context:
space:
mode:
authorPaweł Bylica <pawel.bylica@imapp.pl>2014-12-12 18:48:15 +0800
committerPaweł Bylica <pawel.bylica@imapp.pl>2014-12-12 18:54:44 +0800
commit49f995a890ee54e90650d839267bd24339c954f8 (patch)
treef5e87b2b1cc4c230c184e4bf504a6692e46c5b06 /vm.cpp
parentb0b14eca7f40e29ce892109b0238cbba752ca236 (diff)
downloaddexon-solidity-49f995a890ee54e90650d839267bd24339c954f8.tar
dexon-solidity-49f995a890ee54e90650d839267bd24339c954f8.tar.gz
dexon-solidity-49f995a890ee54e90650d839267bd24339c954f8.tar.bz2
dexon-solidity-49f995a890ee54e90650d839267bd24339c954f8.tar.lz
dexon-solidity-49f995a890ee54e90650d839267bd24339c954f8.tar.xz
dexon-solidity-49f995a890ee54e90650d839267bd24339c954f8.tar.zst
dexon-solidity-49f995a890ee54e90650d839267bd24339c954f8.zip
Add "--jit" option to State tests
Diffstat (limited to 'vm.cpp')
-rw-r--r--vm.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/vm.cpp b/vm.cpp
index bcd7df9b..075b3f2a 100644
--- a/vm.cpp
+++ b/vm.cpp
@@ -277,6 +277,8 @@ namespace dev { namespace test {
void doVMTests(json_spirit::mValue& v, bool _fillin)
{
+ processCommandLineOptions();
+
for (auto& i: v.get_obj())
{
cnote << i.first;
@@ -286,20 +288,7 @@ void doVMTests(json_spirit::mValue& v, bool _fillin)
BOOST_REQUIRE(o.count("pre") > 0);
BOOST_REQUIRE(o.count("exec") > 0);
- auto argc = boost::unit_test::framework::master_test_suite().argc;
- auto argv = boost::unit_test::framework::master_test_suite().argv;
-
- for (auto i = 0; i < argc; ++i)
- {
- if (std::string(argv[i]) == "--jit")
- {
- VMFactory::setKind(VMKind::JIT);
- break;
- }
- }
-
- dev::test::FakeExtVM fev;
-
+ FakeExtVM fev;
fev.importEnv(o["env"].get_obj());
fev.importState(o["pre"].get_obj());
@@ -340,6 +329,8 @@ void doVMTests(json_spirit::mValue& v, bool _fillin)
}
auto endTime = std::chrono::high_resolution_clock::now();
+ auto argc = boost::unit_test::framework::master_test_suite().argc;
+ auto argv = boost::unit_test::framework::master_test_suite().argv;
for (auto i = 0; i < argc; ++i)
{
if (std::string(argv[i]) == "--show-times")