diff options
author | RJ Catalano <catalanor0220@gmail.com> | 2016-01-12 05:36:30 +0800 |
---|---|---|
committer | RJ Catalano <catalanor0220@gmail.com> | 2016-01-12 05:36:30 +0800 |
commit | 9c29cf79cf404132ec3ab149c492cfa97b677543 (patch) | |
tree | 2a839526306fbac3abd90076e1ced09ea97fd9af /test/libsolidity | |
parent | ac664e7f86593ff3d70576ac475f07f9c91b9ca8 (diff) | |
download | dexon-solidity-9c29cf79cf404132ec3ab149c492cfa97b677543.tar dexon-solidity-9c29cf79cf404132ec3ab149c492cfa97b677543.tar.gz dexon-solidity-9c29cf79cf404132ec3ab149c492cfa97b677543.tar.bz2 dexon-solidity-9c29cf79cf404132ec3ab149c492cfa97b677543.tar.lz dexon-solidity-9c29cf79cf404132ec3ab149c492cfa97b677543.tar.xz dexon-solidity-9c29cf79cf404132ec3ab149c492cfa97b677543.tar.zst dexon-solidity-9c29cf79cf404132ec3ab149c492cfa97b677543.zip |
added documentation and one last test for struct creation inline
Diffstat (limited to 'test/libsolidity')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
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"( |