aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/SolidityABIJSON.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/SolidityABIJSON.cpp')
-rw-r--r--libsolidity/SolidityABIJSON.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/libsolidity/SolidityABIJSON.cpp b/libsolidity/SolidityABIJSON.cpp
index f0e54a94..26d0110b 100644
--- a/libsolidity/SolidityABIJSON.cpp
+++ b/libsolidity/SolidityABIJSON.cpp
@@ -495,6 +495,36 @@ BOOST_AUTO_TEST_CASE(empty_name_return_parameter)
checkInterface(sourceCode, interface);
}
+BOOST_AUTO_TEST_CASE(constructor_abi)
+{
+ char const* sourceCode = R"(
+ contract test {
+ function test(uint param1, test param2, bool param3) {}
+ }
+ )";
+
+ char const* interface = R"([
+ {
+ "inputs": [
+ {
+ "name": "param1",
+ "type": "uint256"
+ },
+ {
+ "name": "param2",
+ "type": "address"
+ },
+ {
+ "name": "param3",
+ "type": "bool"
+ }
+ ],
+ "type": "constructor"
+ }
+ ])";
+ checkInterface(sourceCode, interface);
+}
+
BOOST_AUTO_TEST_SUITE_END()
}