aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
authorLianaHus <liana@ethdev.com>2015-09-23 23:31:37 +0800
committerLianaHus <liana@ethdev.com>2015-09-23 23:31:37 +0800
commit9547c4563c09fa816330ccd539d393344ac03fb4 (patch)
treea1dbe51789424f933f63dc5ee891c6410203b8bd /test/libsolidity/SolidityEndToEndTest.cpp
parent09f1f1e5955fc358697b49542c6c8eb42496ef10 (diff)
downloaddexon-solidity-9547c4563c09fa816330ccd539d393344ac03fb4.tar.gz
dexon-solidity-9547c4563c09fa816330ccd539d393344ac03fb4.tar.zst
dexon-solidity-9547c4563c09fa816330ccd539d393344ac03fb4.zip
fixed-sized arrays as return type
Conflicts: test/libsolidity/SolidityEndToEndTest.cpp
Diffstat (limited to 'test/libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r--test/libsolidity/SolidityEndToEndTest.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp
index 8026f216..42dfcd37 100644
--- a/test/libsolidity/SolidityEndToEndTest.cpp
+++ b/test/libsolidity/SolidityEndToEndTest.cpp
@@ -5325,6 +5325,25 @@ BOOST_AUTO_TEST_CASE(strings_in_struct)
BOOST_CHECK(callContractFunction("getLast()") == encodeDyn(s));
}
+BOOST_AUTO_TEST_CASE(fixed_arrays_as_return_type)
+{
+ char const* sourceCode = R"(
+ contract A {
+ function f() constant returns (uint16[5] arr)
+ {
+ }
+ }
+ contract B {
+ function f()
+ {
+ var a = new A();
+ uint16[5] memory res = a.f();
+ }
+ }
+ )";
+ compileAndRun(sourceCode, 0, "B");
+}
+
BOOST_AUTO_TEST_SUITE_END()
}