diff options
author | chriseth <c@ethdev.com> | 2016-09-06 16:59:13 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2016-09-06 16:59:13 +0800 |
commit | dff9633084ebc241d8268c5dbd35a0c5307fd6fc (patch) | |
tree | 023c638a4be2f60d2d0e8c7b9391664c0bdf68f1 /test | |
parent | 384f189a6adffa7b1879bb06ded4453ef5f00dcb (diff) | |
download | dexon-solidity-dff9633084ebc241d8268c5dbd35a0c5307fd6fc.tar.gz dexon-solidity-dff9633084ebc241d8268c5dbd35a0c5307fd6fc.tar.zst dexon-solidity-dff9633084ebc241d8268c5dbd35a0c5307fd6fc.zip |
Test and fixes for payable fallback in ABI.
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityABIJSON.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
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() |