diff options
author | Yoichi Hirai <i@yoichihirai.com> | 2016-11-17 19:39:22 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-07-01 17:35:51 +0800 |
commit | fdc9ef14ad02d6f940a3b5789810bc63f80cdd40 (patch) | |
tree | 8b6510d44aa546f6d390c59b2aebdb54113b5bb7 /test/libsolidity | |
parent | 7cbf6a86dda594dd880d77eaa399a345bd2d8659 (diff) | |
download | dexon-solidity-fdc9ef14ad02d6f940a3b5789810bc63f80cdd40.tar.gz dexon-solidity-fdc9ef14ad02d6f940a3b5789810bc63f80cdd40.tar.zst dexon-solidity-fdc9ef14ad02d6f940a3b5789810bc63f80cdd40.zip |
test: add an assertion about storing an invalid boolean into the memory
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityEndToEndTest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 26d4ff4a..50096792 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -3715,11 +3715,19 @@ BOOST_AUTO_TEST_CASE(storing_invalid_boolean) perm = tmp; return 1; } + function ret() returns(bool) { + bool tmp; + assembly { + tmp := 5 + } + return tmp; + } } )"; compileAndRun(sourceCode); BOOST_CHECK(callContractFunction("set()") == encodeArgs(1)); BOOST_CHECK(callContractFunction("perm()") == encodeArgs(1)); + BOOST_CHECK(callContractFunction("ret()") == encodeArgs(1)); } |