aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityABIJSON.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/SolidityABIJSON.cpp')
-rw-r--r--test/libsolidity/SolidityABIJSON.cpp36
1 files changed, 36 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityABIJSON.cpp b/test/libsolidity/SolidityABIJSON.cpp
index 7f03285d..3de8b732 100644
--- a/test/libsolidity/SolidityABIJSON.cpp
+++ b/test/libsolidity/SolidityABIJSON.cpp
@@ -980,6 +980,42 @@ BOOST_AUTO_TEST_CASE(return_structs)
checkInterface(text, interface);
}
+BOOST_AUTO_TEST_CASE(return_structs_with_contracts)
+{
+ char const* text = R"(
+ contract C {
+ struct S { C[] x; C y; }
+ function f() returns (S s, C c) {
+ }
+ }
+ )";
+ char const* interface = R"(
+ [
+ {
+ "constant" : false,
+ "payable": false,
+ "inputs": [],
+ "name": "f",
+ "outputs" : [{
+ "name" : "s",
+ "type" : [{
+ "name" : "x",
+ "type" : "address[]"
+ }, {
+ "name" : "y",
+ "type" : "address"
+ }]
+ }, {
+ "name" : "c",
+ "type" : "address"
+ }],
+ "type" : "function"
+ }
+ ]
+ )";
+ checkInterface(text, interface);
+}
+
BOOST_AUTO_TEST_CASE(event_structs)
{
char const* text = R"(