added documentation and one last test for struct creation inline

This commit is contained in:
RJ Catalano
2016-01-11 15:36:30 -06:00
parent ac664e7f86
commit 9c29cf79cf
2 changed files with 19 additions and 1 deletions
@@ -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"(