aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityABIJSON.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/SolidityABIJSON.cpp')
-rw-r--r--test/libsolidity/SolidityABIJSON.cpp28
1 files changed, 19 insertions, 9 deletions
diff --git a/test/libsolidity/SolidityABIJSON.cpp b/test/libsolidity/SolidityABIJSON.cpp
index b21e03eb..cfc7b9bd 100644
--- a/test/libsolidity/SolidityABIJSON.cpp
+++ b/test/libsolidity/SolidityABIJSON.cpp
@@ -273,15 +273,6 @@ BOOST_AUTO_TEST_CASE(const_function)
checkInterface(sourceCode, interface);
}
-BOOST_AUTO_TEST_CASE(exclude_fallback_function)
-{
- char const* sourceCode = "contract test { function() {} }";
-
- char const* interface = "[]";
-
- checkInterface(sourceCode, interface);
-}
-
BOOST_AUTO_TEST_CASE(events)
{
char const* sourceCode = "contract test {\n"
@@ -626,6 +617,25 @@ BOOST_AUTO_TEST_CASE(library_function)
checkInterface(sourceCode, interface);
}
+BOOST_AUTO_TEST_CASE(include_fallback_function)
+{
+ char const* sourceCode = R"(
+ contract test {
+ function() {}
+ }
+ )";
+
+ char const* interface = R"(
+ [
+ {
+ "constant" : false,
+ "type" : "fallback"
+ }
+ ]
+ )";
+ checkInterface(sourceCode, interface);
+}
+
BOOST_AUTO_TEST_SUITE_END()
}