mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #7389 from ethereum/isoltest-revert-fix
[isoltest] Fix auto-update when function reverts
This commit is contained in:
commit
697e04fe5e
@ -9,6 +9,9 @@ contract C {
|
||||
function g(bool _value) public pure {
|
||||
require(_value, "Value is false.");
|
||||
}
|
||||
function h() public pure returns (uint) {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// EVMVersion: >homestead
|
||||
@ -17,3 +20,4 @@ contract C {
|
||||
// e() -> FAILURE, hex"08c379a0", 0x20, 19, "Transaction failed."
|
||||
// f(bool): false -> FAILURE, hex"08c379a0", 0x20, 0
|
||||
// g(bool): false -> FAILURE, hex"08c379a0", 0x20, 15, "Value is false."
|
||||
// h() -> FAILURE
|
@ -126,8 +126,11 @@ string TestFunctionCall::format(
|
||||
{
|
||||
boost::optional<ParameterList> abiParams;
|
||||
|
||||
if (isFailure && !output.empty())
|
||||
abiParams = boost::make_optional(ContractABIUtils::failureParameters(output));
|
||||
if (isFailure)
|
||||
{
|
||||
if (!output.empty())
|
||||
abiParams = boost::make_optional(ContractABIUtils::failureParameters(output));
|
||||
}
|
||||
else
|
||||
abiParams = ContractABIUtils::parametersFromJsonOutputs(
|
||||
_errorReporter,
|
||||
|
Loading…
Reference in New Issue
Block a user