diff options
author | Vlad Gluhovsky <gluk256@gmail.com> | 2015-05-12 04:29:12 +0800 |
---|---|---|
committer | Vlad Gluhovsky <gluk256@gmail.com> | 2015-05-12 04:29:12 +0800 |
commit | 6ebf0ffcd37f15c7175133b4dbe14a7882a45087 (patch) | |
tree | b425da4371c633b6ae6e58f89569d4a57a0177f3 /libsolidity/SolidityABIJSON.cpp | |
parent | a4d4cf89dacdea17335a41cabc78d382300379ff (diff) | |
parent | cf23eea716f16ab05e10c8bb63978083a2cbe5a6 (diff) | |
download | dexon-solidity-6ebf0ffcd37f15c7175133b4dbe14a7882a45087.tar dexon-solidity-6ebf0ffcd37f15c7175133b4dbe14a7882a45087.tar.gz dexon-solidity-6ebf0ffcd37f15c7175133b4dbe14a7882a45087.tar.bz2 dexon-solidity-6ebf0ffcd37f15c7175133b4dbe14a7882a45087.tar.lz dexon-solidity-6ebf0ffcd37f15c7175133b4dbe14a7882a45087.tar.xz dexon-solidity-6ebf0ffcd37f15c7175133b4dbe14a7882a45087.tar.zst dexon-solidity-6ebf0ffcd37f15c7175133b4dbe14a7882a45087.zip |
Merge branch 'develop' of https://github.com/ethereum/cpp-ethereum into develop
Diffstat (limited to 'libsolidity/SolidityABIJSON.cpp')
-rw-r--r-- | libsolidity/SolidityABIJSON.cpp | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/libsolidity/SolidityABIJSON.cpp b/libsolidity/SolidityABIJSON.cpp index 26d0110b..f9bf78d0 100644 --- a/libsolidity/SolidityABIJSON.cpp +++ b/libsolidity/SolidityABIJSON.cpp @@ -525,6 +525,49 @@ BOOST_AUTO_TEST_CASE(constructor_abi) checkInterface(sourceCode, interface); } + +BOOST_AUTO_TEST_CASE(return_param_in_abi) +{ + // bug #1801 + char const* sourceCode = R"( + contract test { + enum ActionChoices { GoLeft, GoRight, GoStraight, Sit } + function test(ActionChoices param) {} + function ret() returns(ActionChoices){ + ActionChoices action = ActionChoices.GoLeft; + return action; + } + } + )"; + + char const* interface = R"( + [ + { + "constant" : false, + "inputs" : [], + "name" : "ret", + "outputs" : [ + { + "name" : "", + "type" : "uint8" + } + ], + "type" : "function" + }, + { + "inputs": [ + { + "name": "param", + "type": "uint8" + } + ], + "type": "constructor" + } + ] + )"; + checkInterface(sourceCode, interface); +} + BOOST_AUTO_TEST_SUITE_END() } |