mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix endToEnd test
This commit is contained in:
parent
431c2fbcf3
commit
b7c6e53d3d
@ -10528,11 +10528,18 @@ BOOST_AUTO_TEST_CASE(non_payable_throw)
|
|||||||
contract C {
|
contract C {
|
||||||
uint public a;
|
uint public a;
|
||||||
function f() public returns (uint) {
|
function f() public returns (uint) {
|
||||||
|
return msgvalue();
|
||||||
|
}
|
||||||
|
function msgvalue() internal returns (uint) {
|
||||||
return msg.value;
|
return msg.value;
|
||||||
}
|
}
|
||||||
function() external {
|
function() external {
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
function update() internal {
|
||||||
a = msg.value + 1;
|
a = msg.value + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
)";
|
)";
|
||||||
compileAndRun(sourceCode, 0, "C");
|
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
|
if (false) _; // avoid the function, we should still not accept ether
|
||||||
}
|
}
|
||||||
function f() tryCircumvent public returns (uint) {
|
function f() tryCircumvent public returns (uint) {
|
||||||
|
return msgvalue();
|
||||||
|
}
|
||||||
|
function msgvalue() internal returns (uint) {
|
||||||
return msg.value;
|
return msg.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user