aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Alt <leo@ethereum.org>2018-08-20 21:13:38 +0800
committerchriseth <chris@ethereum.org>2018-09-04 00:35:57 +0800
commitb7c6e53d3d74b649ee6275254d30162aef403e17 (patch)
tree31a24629c48f97b7ef871fc074768c8b803bbd57
parent431c2fbcf370926d6c3e7e93667d8472f2f6b73b (diff)
downloaddexon-solidity-b7c6e53d3d74b649ee6275254d30162aef403e17.tar
dexon-solidity-b7c6e53d3d74b649ee6275254d30162aef403e17.tar.gz
dexon-solidity-b7c6e53d3d74b649ee6275254d30162aef403e17.tar.bz2
dexon-solidity-b7c6e53d3d74b649ee6275254d30162aef403e17.tar.lz
dexon-solidity-b7c6e53d3d74b649ee6275254d30162aef403e17.tar.xz
dexon-solidity-b7c6e53d3d74b649ee6275254d30162aef403e17.tar.zst
dexon-solidity-b7c6e53d3d74b649ee6275254d30162aef403e17.zip
Fix endToEnd test
-rw-r--r--test/libsolidity/SolidityEndToEndTest.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp
index 2bf20126..f058458d 100644
--- a/test/libsolidity/SolidityEndToEndTest.cpp
+++ b/test/libsolidity/SolidityEndToEndTest.cpp
@@ -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;
}
}