aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2016-10-18 19:25:00 +0800
committerYoichi Hirai <i@yoichihirai.com>2016-10-18 19:25:00 +0800
commit0542df25df5c1de5a4b62524c1fa40097b131caa (patch)
treed95fb63d078da48a9402c37d6a3e92ba10a9f73c /test
parent0a9eb64562d8366f47913ecfd762144ed203fa73 (diff)
downloaddexon-solidity-0542df25df5c1de5a4b62524c1fa40097b131caa.tar.gz
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.cpp9
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"(