aboutsummaryrefslogtreecommitdiffstats
path: root/vm.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'vm.cpp')
-rw-r--r--vm.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/vm.cpp b/vm.cpp
index ff890352..4c1874cb 100644
--- a/vm.cpp
+++ b/vm.cpp
@@ -388,6 +388,16 @@ void doVMTests(json_spirit::mValue& v, bool _fillin)
if (!vmExceptionOccured)
{
o["post"] = mValue(fev.exportState());
+
+ if (o.count("expect") > 0)
+ {
+ State postState, expectState;
+ ImportTest::importState(o["post"].get_obj(), postState);
+ ImportTest::importState(o["expect"].get_obj(), expectState);
+ ImportTest::compareStates(expectState, postState);
+ o.erase(o.find("expect"));
+ }
+
o["callcreates"] = fev.exportCallCreates();
o["out"] = "0x" + toHex(output);
fev.push(o, "gas", gas);