mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix random test generator
This commit is contained in:
parent
20b6b30b99
commit
421b5ccc36
@ -31,6 +31,7 @@
|
||||
#include <json_spirit/json_spirit_writer_template.h>
|
||||
#include <libdevcore/CommonIO.h>
|
||||
#include <libdevcore/CommonData.h>
|
||||
#include <libethereum/VMFactory.h>
|
||||
#include <libevmcore/Instruction.h>
|
||||
#include <libevm/VM.h>
|
||||
#include "vm.h"
|
||||
@ -128,6 +129,9 @@ void doMyTests(json_spirit::mValue& v)
|
||||
assert(o.count("pre") > 0);
|
||||
assert(o.count("exec") > 0);
|
||||
|
||||
|
||||
auto vmObj = eth::VMFactory::create(eth::VMFactory::Interpreter);
|
||||
auto& vm = *vmObj;
|
||||
dev::test::FakeExtVM fev;
|
||||
fev.importEnv(o["env"].get_obj());
|
||||
fev.importState(o["pre"].get_obj());
|
||||
@ -141,9 +145,8 @@ void doMyTests(json_spirit::mValue& v)
|
||||
fev.code = fev.thisTxCode;
|
||||
}
|
||||
|
||||
vm.reset(fev.gas);
|
||||
bytes output;
|
||||
eth::VM vm(fev.gas);
|
||||
|
||||
u256 gas;
|
||||
bool vmExceptionOccured = false;
|
||||
try
|
||||
|
Loading…
Reference in New Issue
Block a user