Improved error messages for EndToEnd tests.

This commit is contained in:
chriseth
2017-09-25 10:49:25 +01:00
committed by Alex Beregszaszi
parent ccb689701e
commit 8e4f242274
4 changed files with 884 additions and 824 deletions
+8
View File
@@ -131,6 +131,8 @@ public:
}
}
static std::pair<bool, std::string> compareAndCreateMessage(bytes const& _result, bytes const& _expectation);
static bytes encode(bool _value) { return encode(byte(_value)); }
static bytes encode(int _value) { return encode(u256(_value)); }
static bytes encode(size_t _value) { return encode(u256(_value)); }
@@ -293,6 +295,12 @@ protected:
u256 m_gasUsed;
};
#define ABI_CHECK(result, expectation) do { \
auto abiCheckResult = ExecutionFramework::compareAndCreateMessage((result), (expectation)); \
BOOST_CHECK_MESSAGE(abiCheckResult.first, abiCheckResult.second); \
} while (0)
}
} // end namespaces