From dff9633084ebc241d8268c5dbd35a0c5307fd6fc Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 6 Sep 2016 10:59:13 +0200 Subject: Test and fixes for payable fallback in ABI. --- test/libsolidity/SolidityABIJSON.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test/libsolidity/SolidityABIJSON.cpp') diff --git a/test/libsolidity/SolidityABIJSON.cpp b/test/libsolidity/SolidityABIJSON.cpp index 9ee74d41..185ba3bf 100644 --- a/test/libsolidity/SolidityABIJSON.cpp +++ b/test/libsolidity/SolidityABIJSON.cpp @@ -645,6 +645,7 @@ BOOST_AUTO_TEST_CASE(include_fallback_function) [ { "constant" : false, + "payable": false, "type" : "fallback" } ] @@ -684,6 +685,25 @@ BOOST_AUTO_TEST_CASE(payable_function) checkInterface(sourceCode, interface); } +BOOST_AUTO_TEST_CASE(payable_fallback_unction) +{ + char const* sourceCode = R"( + contract test { + function () payable {} + } + )"; + + char const* interface = R"( + [ + { + "constant" : false, + "payable": true, + "type" : "fallback" + } + ] + )"; + checkInterface(sourceCode, interface); +} BOOST_AUTO_TEST_SUITE_END() -- cgit v1.2.3