aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGav Wood <g@ethdev.com>2015-06-10 23:58:17 +0800
committerGav Wood <g@ethdev.com>2015-06-10 23:58:17 +0800
commit88250d6ddb657cc2557c4adad44d28c11fc6c3d8 (patch)
tree83d9898b1f618ad8fab36ee630c8dfa1673132c9
parent7c4324eb5fcee546f809c81b29d2aac5a079d2fc (diff)
parentda5eca2f95e545bd587480a39c296037865ce8c2 (diff)
downloaddexon-solidity-88250d6ddb657cc2557c4adad44d28c11fc6c3d8.tar.gz
dexon-solidity-88250d6ddb657cc2557c4adad44d28c11fc6c3d8.tar.zst
dexon-solidity-88250d6ddb657cc2557c4adad44d28c11fc6c3d8.zip
Merge pull request #2120 from winsvega/issues
stPrecompiledContracts from transaction test
-rw-r--r--TestHelper.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/TestHelper.cpp b/TestHelper.cpp
index f7da0238..873ea21e 100644
--- a/TestHelper.cpp
+++ b/TestHelper.cpp
@@ -344,6 +344,16 @@ void ImportTest::exportTest(bytes const& _output, State const& _statePost)
m_TestObject["out"] = (_output.size() > 4096 && !Options::get().fulloutput) ? "#" + toString(_output.size()) : toHex(_output, 2, HexPrefix::Add);
+ // compare expected output with post output
+ if (m_TestObject.count("expectOut") > 0)
+ {
+ std::string warning = "Check State: Error! Unexpected output: " + m_TestObject["out"].get_str() + " Expected: " + m_TestObject["expectOut"].get_str();
+ if (Options::get().checkState)
+ BOOST_CHECK_MESSAGE((m_TestObject["out"].get_str() == m_TestObject["expectOut"].get_str()), warning);
+ else
+ BOOST_WARN_MESSAGE((m_TestObject["out"].get_str() == m_TestObject["expectOut"].get_str()), warning);
+ }
+
// export logs
m_TestObject["logs"] = exportLog(_statePost.pending().size() ? _statePost.log(0) : LogEntries());