[isoltest] Fixes auto-update for revert.

This commit is contained in:
Erik Kundt 2019-09-09 22:46:43 +02:00
parent 6596837e45
commit 5e12e0cf27
2 changed files with 9 additions and 2 deletions

View File

@ -9,6 +9,9 @@ contract C {
function g(bool _value) public pure { function g(bool _value) public pure {
require(_value, "Value is false."); require(_value, "Value is false.");
} }
function h() public pure returns (uint) {
assert(false);
}
} }
// ==== // ====
// EVMVersion: >homestead // EVMVersion: >homestead
@ -17,3 +20,4 @@ contract C {
// e() -> FAILURE, hex"08c379a0", 0x20, 19, "Transaction failed." // e() -> FAILURE, hex"08c379a0", 0x20, 19, "Transaction failed."
// f(bool): false -> FAILURE, hex"08c379a0", 0x20, 0 // f(bool): false -> FAILURE, hex"08c379a0", 0x20, 0
// g(bool): false -> FAILURE, hex"08c379a0", 0x20, 15, "Value is false." // g(bool): false -> FAILURE, hex"08c379a0", 0x20, 15, "Value is false."
// h() -> FAILURE

View File

@ -126,8 +126,11 @@ string TestFunctionCall::format(
{ {
boost::optional<ParameterList> abiParams; boost::optional<ParameterList> abiParams;
if (isFailure && !output.empty()) if (isFailure)
{
if (!output.empty())
abiParams = boost::make_optional(ContractABIUtils::failureParameters(output)); abiParams = boost::make_optional(ContractABIUtils::failureParameters(output));
}
else else
abiParams = ContractABIUtils::parametersFromJsonOutputs( abiParams = ContractABIUtils::parametersFromJsonOutputs(
_errorReporter, _errorReporter,