diff options
Diffstat (limited to 'test/libsolidity/SolidityABIJSON.cpp')
-rw-r--r-- | test/libsolidity/SolidityABIJSON.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/test/libsolidity/SolidityABIJSON.cpp b/test/libsolidity/SolidityABIJSON.cpp index 0ad9e928..5cabb7fa 100644 --- a/test/libsolidity/SolidityABIJSON.cpp +++ b/test/libsolidity/SolidityABIJSON.cpp @@ -684,7 +684,7 @@ BOOST_AUTO_TEST_CASE(payable_function) checkInterface(sourceCode, interface); } -BOOST_AUTO_TEST_CASE(payable_fallback_unction) +BOOST_AUTO_TEST_CASE(payable_fallback_function) { char const* sourceCode = R"( contract test { @@ -703,6 +703,32 @@ BOOST_AUTO_TEST_CASE(payable_fallback_unction) checkInterface(sourceCode, interface); } +BOOST_AUTO_TEST_CASE(function_type) +{ + char const* sourceCode = R"( + contract test { + function g(function(uint) external returns (uint) x) {} + } + )"; + + char const* interface = R"( + [ + { + "constant" : false, + "payable": false, + "inputs": [{ + "name": "x", + "type": "function" + }], + "name": "g", + "outputs": [], + "type" : "function" + } + ] + )"; + checkInterface(sourceCode, interface); +} + BOOST_AUTO_TEST_SUITE_END() } |