mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Move some struct tests to require ABIEncoderV2
This commit is contained in:
parent
9e36c189e5
commit
b32d7a84fc
@ -94,6 +94,7 @@ BOOST_AUTO_TEST_CASE(warn_on_typecast)
|
||||
BOOST_AUTO_TEST_CASE(warn_on_struct)
|
||||
{
|
||||
string text = R"(
|
||||
pragma experimental ABIEncoderV2;
|
||||
contract C {
|
||||
struct A { uint a; uint b; }
|
||||
function f() public pure returns (A) {
|
||||
|
@ -942,6 +942,7 @@ BOOST_AUTO_TEST_CASE(function_type)
|
||||
BOOST_AUTO_TEST_CASE(return_structs)
|
||||
{
|
||||
char const* text = R"(
|
||||
pragma experimental ABIEncoderV2;
|
||||
contract C {
|
||||
struct S { uint a; T[] sub; }
|
||||
struct T { uint[2] x; }
|
||||
@ -991,6 +992,7 @@ BOOST_AUTO_TEST_CASE(return_structs)
|
||||
BOOST_AUTO_TEST_CASE(return_structs_with_contracts)
|
||||
{
|
||||
char const* text = R"(
|
||||
pragma experimental ABIEncoderV2;
|
||||
contract C {
|
||||
struct S { C[] x; C y; }
|
||||
function f() returns (S s, C c) {
|
||||
@ -1090,6 +1092,7 @@ BOOST_AUTO_TEST_CASE(event_structs)
|
||||
BOOST_AUTO_TEST_CASE(structs_in_libraries)
|
||||
{
|
||||
char const* text = R"(
|
||||
pragma experimental ABIEncoderV2;
|
||||
library L {
|
||||
struct S { uint a; T[] sub; bytes b; }
|
||||
struct T { uint[2] x; }
|
||||
|
@ -602,6 +602,7 @@ BOOST_AUTO_TEST_CASE(enum_external_type)
|
||||
BOOST_AUTO_TEST_CASE(external_structs)
|
||||
{
|
||||
char const* text = R"(
|
||||
pragma experimental ABIEncoderV2;
|
||||
contract Test {
|
||||
enum ActionChoices { GoLeft, GoRight, GoStraight, Sit }
|
||||
struct Empty {}
|
||||
@ -629,6 +630,7 @@ BOOST_AUTO_TEST_CASE(external_structs)
|
||||
BOOST_AUTO_TEST_CASE(external_structs_in_libraries)
|
||||
{
|
||||
char const* text = R"(
|
||||
pragma experimental ABIEncoderV2;
|
||||
library Test {
|
||||
enum ActionChoices { GoLeft, GoRight, GoStraight, Sit }
|
||||
struct Empty {}
|
||||
@ -3511,6 +3513,7 @@ BOOST_AUTO_TEST_CASE(using_for_not_used)
|
||||
BOOST_AUTO_TEST_CASE(library_memory_struct)
|
||||
{
|
||||
char const* text = R"(
|
||||
pragma experimental ABIEncoderV2;
|
||||
library c {
|
||||
struct S { uint x; }
|
||||
function f() public returns (S ) {}
|
||||
@ -5696,6 +5699,7 @@ BOOST_AUTO_TEST_CASE(constructible_internal_constructor)
|
||||
BOOST_AUTO_TEST_CASE(return_structs)
|
||||
{
|
||||
char const* text = R"(
|
||||
pragma experimental ABIEncoderV2;
|
||||
contract C {
|
||||
struct S { uint a; T[] sub; }
|
||||
struct T { uint[] x; }
|
||||
|
Loading…
Reference in New Issue
Block a user