diff options
author | Yoichi Hirai <i@yoichihirai.com> | 2016-10-18 19:25:00 +0800 |
---|---|---|
committer | Yoichi Hirai <i@yoichihirai.com> | 2016-10-18 19:25:00 +0800 |
commit | 0542df25df5c1de5a4b62524c1fa40097b131caa (patch) | |
tree | d95fb63d078da48a9402c37d6a3e92ba10a9f73c /test | |
parent | 0a9eb64562d8366f47913ecfd762144ed203fa73 (diff) | |
download | dexon-solidity-0542df25df5c1de5a4b62524c1fa40097b131caa.tar dexon-solidity-0542df25df5c1de5a4b62524c1fa40097b131caa.tar.gz dexon-solidity-0542df25df5c1de5a4b62524c1fa40097b131caa.tar.bz2 dexon-solidity-0542df25df5c1de5a4b62524c1fa40097b131caa.tar.lz dexon-solidity-0542df25df5c1de5a4b62524c1fa40097b131caa.tar.xz dexon-solidity-0542df25df5c1de5a4b62524c1fa40097b131caa.tar.zst dexon-solidity-0542df25df5c1de5a4b62524c1fa40097b131caa.zip |
Add a test for #1242
This is about `super` as an expression.
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityEndToEndTest.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp index 155f117f..692abe57 100644 --- a/test/libsolidity/SolidityEndToEndTest.cpp +++ b/test/libsolidity/SolidityEndToEndTest.cpp @@ -2513,6 +2513,15 @@ BOOST_AUTO_TEST_CASE(super_in_constructor) BOOST_CHECK(callContractFunction("f()") == encodeArgs(1 | 2 | 4 | 8)); } +BOOST_AUTO_TEST_CASE(super_alone) +{ + char const* sourceCode = R"( + contract A { function f() { super; } } + )"; + compileAndRun(sourceCode, 0, "A"); + BOOST_CHECK(callContractFunction("f()") == encodeArgs()); +} + BOOST_AUTO_TEST_CASE(fallback_function) { char const* sourceCode = R"( |