diff options
author | Christian Parpart <christian@parpart.family> | 2018-06-06 17:15:22 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-06-14 07:24:43 +0800 |
commit | a211b8911885ded6ddcd4d7400994a85235fe8e4 (patch) | |
tree | de225bc1e0f6f0dc29ab7984088752106dbfe5cd /test/libsolidity/ABIEncoderTests.cpp | |
parent | 014bbc6c97a4abdf8eed5d0273d00c80308e355d (diff) | |
download | dexon-solidity-a211b8911885ded6ddcd4d7400994a85235fe8e4.tar.gz dexon-solidity-a211b8911885ded6ddcd4d7400994a85235fe8e4.tar.zst dexon-solidity-a211b8911885ded6ddcd4d7400994a85235fe8e4.zip |
Enforce disallowing empty structs
This patch enfoces an error when it encounters an empty struct,
effectively eliminating the deprecation warning.
Also adjust 419_interface_structs to explicitely test for (non-empty) structs,
as this behaviour "may" change in the future.
Diffstat (limited to 'test/libsolidity/ABIEncoderTests.cpp')
-rw-r--r-- | test/libsolidity/ABIEncoderTests.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/test/libsolidity/ABIEncoderTests.cpp b/test/libsolidity/ABIEncoderTests.cpp index 5f15b28f..227eadb5 100644 --- a/test/libsolidity/ABIEncoderTests.cpp +++ b/test/libsolidity/ABIEncoderTests.cpp @@ -447,28 +447,6 @@ BOOST_AUTO_TEST_CASE(structs) ) } -BOOST_AUTO_TEST_CASE(empty_struct) -{ - string sourceCode = R"( - contract C { - struct S { } - S s; - event e(uint16, S, uint16); - function f() returns (uint, S, uint) { - e(7, s, 8); - return (7, s, 8); - } - } - )"; - - NEW_ENCODER( - compileAndRun(sourceCode, 0, "C"); - bytes encoded = encodeArgs(7, 8); - BOOST_CHECK(callContractFunction("f()") == encoded); - REQUIRE_LOG_DATA(encoded); - ) -} - BOOST_AUTO_TEST_CASE(structs2) { string sourceCode = R"( |