aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityABIJSON.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2016-11-15 06:37:19 +0800
committerchriseth <c@ethdev.com>2016-11-16 21:37:19 +0800
commite1fec9b2877492658b079d3278a702310213fe2a (patch)
tree91bc93eb1efc39e84a5af7cf6d7789cbad175447 /test/libsolidity/SolidityABIJSON.cpp
parent830f14c3a3c7bc991ad34c1b0299a31368853d97 (diff)
downloaddexon-solidity-e1fec9b2877492658b079d3278a702310213fe2a.tar.gz
dexon-solidity-e1fec9b2877492658b079d3278a702310213fe2a.tar.zst
dexon-solidity-e1fec9b2877492658b079d3278a702310213fe2a.zip
JSON tests.
Diffstat (limited to 'test/libsolidity/SolidityABIJSON.cpp')
-rw-r--r--test/libsolidity/SolidityABIJSON.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityABIJSON.cpp b/test/libsolidity/SolidityABIJSON.cpp
index c01ff11b..f77ad5fc 100644
--- a/test/libsolidity/SolidityABIJSON.cpp
+++ b/test/libsolidity/SolidityABIJSON.cpp
@@ -703,6 +703,29 @@ BOOST_AUTO_TEST_CASE(payable_fallback_function)
checkInterface(sourceCode, interface);
}
+BOOST_AUTO_TEST_CASE(function_type)
+{
+ char const* sourceCode = R"(
+ contract test {
+ function g(function(uint) external returns (uint)) {}
+ }
+ )";
+
+ char const* interface = R"(
+ [
+ {
+ "constant" : false,
+ "payable": true,
+ "inputs": ["function"],
+ "name": "g",
+ "outputs": [],
+ "type" : "function"
+ }
+ ]
+ )";
+ checkInterface(sourceCode, interface);
+}
+
BOOST_AUTO_TEST_SUITE_END()
}