diff options
author | chriseth <chris@ethereum.org> | 2016-08-30 21:21:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-30 21:21:19 +0800 |
commit | cf974fd103dbb56313eee40ce9ffe4d03d6c1b04 (patch) | |
tree | 8fd3ec7a2fa41ffdd5f0442b78e34b0204f6ef46 /test/libsolidity | |
parent | 29b8965b9541e75905bb688954649ee7b0b0fefc (diff) | |
parent | 4019c832cad989ddb246d2189d19f38273d29661 (diff) | |
download | dexon-solidity-cf974fd103dbb56313eee40ce9ffe4d03d6c1b04.tar.gz dexon-solidity-cf974fd103dbb56313eee40ce9ffe4d03d6c1b04.tar.zst dexon-solidity-cf974fd103dbb56313eee40ce9ffe4d03d6c1b04.zip |
Merge pull request #664 from axic/feature/interface-fallback
Introduce fallback entry in the ABI
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityABIJSON.cpp | 28 |
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() } |