This commit is contained in:
Alex Beregszaszi 2020-12-11 18:36:17 +00:00
parent e03d910e4b
commit 02d01a994d
2 changed files with 6 additions and 10 deletions

View File

@ -8,11 +8,7 @@ contract C {
function msgvalue() internal returns (uint) {
return msg.value;
}
// TODO: remove this helper function once isoltest supports balance checking
function balance() external returns (uint) {
return address(this).balance;
}
}
// ----
// f(), 27 wei -> FAILURE
// balance() -> 0
// balance: 0 wei

View File

@ -103,11 +103,11 @@ vector<solidity::frontend::test::FunctionCall> TestFileParser::parseFunctionCall
else if (accept(Token::Balance, true))
{
// Address is specified
if (accept(Token::HexNumber, true))
{
}
// expect(Token::Colon);
expect(Token::Arrow);
// if (accept(Token::HexNumber, true))
// {
// }
expect(Token::Colon);
// expect(Token::Arrow);
call.expectations.failure = false;
call.expectations.result.push_back(Parameter());
// expectation encoded as value