aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-08-26 22:56:36 +0800
committerchriseth <c@ethdev.com>2016-08-30 21:31:50 +0800
commit546aca2a3ec11df5b54d5a3d01948ebc3d830163 (patch)
tree4b11c02ee199970958256de3ce27eb9a960bb1f4 /test/libsolidity/SolidityEndToEndTest.cpp
parent4bfe09897e3346038b95eb10d74dd0d8c9a8f40e (diff)
downloaddexon-solidity-546aca2a3ec11df5b54d5a3d01948ebc3d830163.tar.gz
dexon-solidity-546aca2a3ec11df5b54d5a3d01948ebc3d830163.tar.zst
dexon-solidity-546aca2a3ec11df5b54d5a3d01948ebc3d830163.zip
Test cases.
Diffstat (limited to 'test/libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r--test/libsolidity/SolidityEndToEndTest.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp
index 14bf28a9..a370aafa 100644
--- a/test/libsolidity/SolidityEndToEndTest.cpp
+++ b/test/libsolidity/SolidityEndToEndTest.cpp
@@ -2541,6 +2541,19 @@ BOOST_AUTO_TEST_CASE(inherited_fallback_function)
BOOST_CHECK(callContractFunction("getData()") == encodeArgs(1));
}
+BOOST_AUTO_TEST_CASE(default_fallback_throws)
+{
+ char const* sourceCode = R"(
+ contract A {
+ function f() returns (bool) {
+ return this.call();
+ }
+ }
+ )";
+ compileAndRun(sourceCode);
+ BOOST_CHECK(callContractFunction("f()") == encodeArgs(0));
+}
+
BOOST_AUTO_TEST_CASE(event)
{
char const* sourceCode = R"(