From 708b7b35adc337500b9c42832f4a5461e7579e55 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Fri, 14 Oct 2016 17:46:48 +0200 Subject: Add a parser test for arrays containing functions --- test/libsolidity/SolidityParser.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/libsolidity/SolidityParser.cpp') diff --git a/test/libsolidity/SolidityParser.cpp b/test/libsolidity/SolidityParser.cpp index d8c6fa10..b1b1d858 100644 --- a/test/libsolidity/SolidityParser.cpp +++ b/test/libsolidity/SolidityParser.cpp @@ -1325,6 +1325,16 @@ BOOST_AUTO_TEST_CASE(calling_function) BOOST_CHECK(successParse(text)); } +BOOST_AUTO_TEST_CASE(array_of_functions) +{ + char const* text = R"( + contract test { + mapping (address => function() internal returns ()) stages; + } + )"; + BOOST_CHECK(successParse(text)); +} + BOOST_AUTO_TEST_SUITE_END() -- cgit