mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Improved error messages for EndToEnd tests.
This commit is contained in:
committed by
Alex Beregszaszi
parent
ccb689701e
commit
8e4f242274
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user