From 9c29cf79cf404132ec3ab149c492cfa97b677543 Mon Sep 17 00:00:00 2001 From: RJ Catalano Date: Mon, 11 Jan 2016 15:36:30 -0600 Subject: added documentation and one last test for struct creation inline --- test/libsolidity/SolidityNameAndTypeResolution.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test/libsolidity') diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 3909fc6c..2281ac10 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -2850,6 +2850,22 @@ BOOST_AUTO_TEST_CASE(inline_array_declaration_no_type_strings) BOOST_CHECK(success(text)); } +BOOST_AUTO_TEST_CASE(inline_struct_declaration_arrays) +{ + char const* text = R"( + contract C { + struct S { + uint a; + string b; + } + function f() { + S[2] memory x = [S({a: 1, b: "fish"}), S({a: 2, b: "fish"})]; + } + } + )"; + BOOST_CHECK(success(text)); +} + BOOST_AUTO_TEST_CASE(invalid_types_in_inline_array) { char const* text = R"( -- cgit v1.2.3