diff options
author | chriseth <chris@ethereum.org> | 2017-06-13 16:51:49 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-09-16 19:12:43 +0800 |
commit | 36a90289e65b06c54326a1c254baa5fa6029f766 (patch) | |
tree | b84191a9460b107396618fe42ad1fada1ba05f67 /test/libsolidity/SolidityABIJSON.cpp | |
parent | 823e67bf4014d20c6c83d509264e1464d9578f99 (diff) | |
download | dexon-solidity-36a90289e65b06c54326a1c254baa5fa6029f766.tar.gz dexon-solidity-36a90289e65b06c54326a1c254baa5fa6029f766.tar.zst dexon-solidity-36a90289e65b06c54326a1c254baa5fa6029f766.zip |
Fix interface type conversion internal to structs.
Diffstat (limited to 'test/libsolidity/SolidityABIJSON.cpp')
-rw-r--r-- | test/libsolidity/SolidityABIJSON.cpp | 36 |
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"( |