Fix endToEnd test

This commit is contained in:
Leonardo Alt 2018-08-20 15:13:38 +02:00 committed by chriseth
parent 431c2fbcf3
commit b7c6e53d3d

View File

@ -10528,11 +10528,18 @@ BOOST_AUTO_TEST_CASE(non_payable_throw)
contract C {
uint public a;
function f() public returns (uint) {
return msgvalue();
}
function msgvalue() internal returns (uint) {
return msg.value;
}
function() external {
update();
}
function update() internal {
a = msg.value + 1;
}
}
)";
compileAndRun(sourceCode, 0, "C");
@ -10555,6 +10562,9 @@ BOOST_AUTO_TEST_CASE(no_nonpayable_circumvention_by_modifier)
if (false) _; // avoid the function, we should still not accept ether
}
function f() tryCircumvent public returns (uint) {
return msgvalue();
}
function msgvalue() internal returns (uint) {
return msg.value;
}
}