Even numbers of hex digits for Jeff (Go can't handle odd numbers).

Everything a string in VM tests.
This commit is contained in:
Gav Wood 2014-07-10 11:29:39 +01:00
parent d66fa9211f
commit b3088a69f3

13
vm.cpp
View File

@ -154,17 +154,17 @@ public:
static void push(mObject& o, string const& _n, u256 _v) static void push(mObject& o, string const& _n, u256 _v)
{ {
if (_v < (u256)1 << 64) // if (_v < (u256)1 << 64)
o[_n] = (uint64_t)_v; // o[_n] = (uint64_t)_v;
else // else
o[_n] = toString(_v); o[_n] = toString(_v);
} }
static void push(mArray& a, u256 _v) static void push(mArray& a, u256 _v)
{ {
if (_v < (u256)1 << 64) // if (_v < (u256)1 << 64)
a.push_back((uint64_t)_v); // a.push_back((uint64_t)_v);
else // else
a.push_back(toString(_v)); a.push_back(toString(_v));
} }
@ -405,6 +405,7 @@ void doTests(json_spirit::mValue& v, bool _fillin)
if (_fillin) if (_fillin)
{ {
o["env"] = mValue(fev.exportEnv());
o["exec"] = mValue(fev.exportExec()); o["exec"] = mValue(fev.exportExec());
o["post"] = mValue(fev.exportState()); o["post"] = mValue(fev.exportState());
o["callcreates"] = fev.exportCallCreates(); o["callcreates"] = fev.exportCallCreates();