aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/SolidityABIJSON.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-05-28 22:20:50 +0800
committerchriseth <c@ethdev.com>2015-05-28 22:20:50 +0800
commit786b57b88483c2f44c2b7ed4117ea43febd7f42b (patch)
tree1777882bbefa11515b5600675a1f17cc729212ec /libsolidity/SolidityABIJSON.cpp
parentcfaa99727a5f55759e1f78349737a9dc07735984 (diff)
downloaddexon-solidity-786b57b88483c2f44c2b7ed4117ea43febd7f42b.tar
dexon-solidity-786b57b88483c2f44c2b7ed4117ea43febd7f42b.tar.gz
dexon-solidity-786b57b88483c2f44c2b7ed4117ea43febd7f42b.tar.bz2
dexon-solidity-786b57b88483c2f44c2b7ed4117ea43febd7f42b.tar.lz
dexon-solidity-786b57b88483c2f44c2b7ed4117ea43febd7f42b.tar.xz
dexon-solidity-786b57b88483c2f44c2b7ed4117ea43febd7f42b.tar.zst
dexon-solidity-786b57b88483c2f44c2b7ed4117ea43febd7f42b.zip
Re-introduce string type.
Diffstat (limited to 'libsolidity/SolidityABIJSON.cpp')
-rw-r--r--libsolidity/SolidityABIJSON.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/libsolidity/SolidityABIJSON.cpp b/libsolidity/SolidityABIJSON.cpp
index f9bf78d0..f7390dc9 100644
--- a/libsolidity/SolidityABIJSON.cpp
+++ b/libsolidity/SolidityABIJSON.cpp
@@ -568,6 +568,33 @@ BOOST_AUTO_TEST_CASE(return_param_in_abi)
checkInterface(sourceCode, interface);
}
+BOOST_AUTO_TEST_CASE(strings_and_arrays)
+{
+ // bug #1801
+ char const* sourceCode = R"(
+ contract test {
+ function f(string a, bytes b, uint[] c) external {}
+ }
+ )";
+
+ char const* interface = R"(
+ [
+ {
+ "constant" : false,
+ "name": "f",
+ "inputs": [
+ { "name": "a", "type": "string" },
+ { "name": "b", "type": "bytes" },
+ { "name": "c", "type": "uint256[]" }
+ ],
+ "outputs": [],
+ "type" : "function"
+ }
+ ]
+ )";
+ checkInterface(sourceCode, interface);
+}
+
BOOST_AUTO_TEST_SUITE_END()
}