diff options
author | Paweł Bylica <pawel.bylica@imapp.pl> | 2015-05-21 15:45:01 +0800 |
---|---|---|
committer | Paweł Bylica <pawel.bylica@imapp.pl> | 2015-05-21 15:45:01 +0800 |
commit | 3e786f792e9e708ba6c9a3e80754d277f1dc46a0 (patch) | |
tree | 59aa52393acbf73ff5708f688ea3eaddd0b33113 /TestHelper.cpp | |
parent | d67cacfcba60de5099c19c802398268ac462ed1c (diff) | |
parent | a97a326ffe08e7304d4a0e0d2d879d3baef8bb20 (diff) | |
download | dexon-solidity-3e786f792e9e708ba6c9a3e80754d277f1dc46a0.tar dexon-solidity-3e786f792e9e708ba6c9a3e80754d277f1dc46a0.tar.gz dexon-solidity-3e786f792e9e708ba6c9a3e80754d277f1dc46a0.tar.bz2 dexon-solidity-3e786f792e9e708ba6c9a3e80754d277f1dc46a0.tar.lz dexon-solidity-3e786f792e9e708ba6c9a3e80754d277f1dc46a0.tar.xz dexon-solidity-3e786f792e9e708ba6c9a3e80754d277f1dc46a0.tar.zst dexon-solidity-3e786f792e9e708ba6c9a3e80754d277f1dc46a0.zip |
Merge branch 'develop' into feature/vm_gas_counter_refactor
Conflicts:
test/libevm/vm.cpp
Diffstat (limited to 'TestHelper.cpp')
-rw-r--r-- | TestHelper.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/TestHelper.cpp b/TestHelper.cpp index aada8304..476d1ecf 100644 --- a/TestHelper.cpp +++ b/TestHelper.cpp @@ -327,7 +327,8 @@ void ImportTest::checkExpectedState(State const& _stateExpect, State const& _sta void ImportTest::exportTest(bytes const& _output, State const& _statePost) { // export output - m_TestObject["out"] = toHex(_output, 2, HexPrefix::Add); + + m_TestObject["out"] = _output.size() > 4096 ? "#" + toString(_output.size()) : toHex(_output, 2, HexPrefix::Add); // export logs m_TestObject["logs"] = exportLog(_statePost.pending().size() ? _statePost.log(0) : LogEntries()); @@ -489,7 +490,11 @@ LogEntries importLog(json_spirit::mArray& _a) void checkOutput(bytes const& _output, json_spirit::mObject& _o) { int j = 0; - if (_o["out"].type() == json_spirit::array_type) + + if (_o["out"].get_str().find("#") == 0) + BOOST_CHECK((u256)_output.size() == toInt(_o["out"].get_str().substr(1))); + + else if (_o["out"].type() == json_spirit::array_type) for (auto const& d: _o["out"].get_array()) { BOOST_CHECK_MESSAGE(_output[j] == toInt(d), "Output byte [" << j << "] different!"); |