mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update tests
This commit is contained in:
committed by
chriseth
parent
e3b6c5a4bd
commit
b000a022f2
@@ -158,7 +158,7 @@ BOOST_AUTO_TEST_CASE(function_external_types)
|
||||
uint a;
|
||||
}
|
||||
contract Test {
|
||||
function boo(uint, bool, bytes8, bool[2], uint[], C, address[]) external returns (uint ret) {
|
||||
function boo(uint, bool, bytes8, bool[2] calldata, uint[] calldata, C, address[] calldata) external returns (uint ret) {
|
||||
ret = 5;
|
||||
}
|
||||
}
|
||||
@@ -206,10 +206,10 @@ BOOST_AUTO_TEST_CASE(external_structs)
|
||||
struct Simple { uint i; }
|
||||
struct Nested { X[2][] a; uint y; }
|
||||
struct X { bytes32 x; Test t; Simple[] s; }
|
||||
function f(ActionChoices, uint, Simple) external {}
|
||||
function g(Test, Nested) external {}
|
||||
function h(function(Nested memory) external returns (uint)[]) external {}
|
||||
function i(Nested[]) external {}
|
||||
function f(ActionChoices, uint, Simple calldata) external {}
|
||||
function g(Test, Nested calldata) external {}
|
||||
function h(function(Nested memory) external returns (uint)[] calldata) external {}
|
||||
function i(Nested[] calldata) external {}
|
||||
}
|
||||
)";
|
||||
SourceUnit const* sourceUnit = parseAndAnalyse(text);
|
||||
@@ -234,10 +234,10 @@ BOOST_AUTO_TEST_CASE(external_structs_in_libraries)
|
||||
struct Simple { uint i; }
|
||||
struct Nested { X[2][] a; uint y; }
|
||||
struct X { bytes32 x; Test t; Simple[] s; }
|
||||
function f(ActionChoices, uint, Simple) external {}
|
||||
function g(Test, Nested) external {}
|
||||
function h(function(Nested memory) external returns (uint)[]) external {}
|
||||
function i(Nested[]) external {}
|
||||
function f(ActionChoices, uint, Simple calldata) external {}
|
||||
function g(Test, Nested calldata) external {}
|
||||
function h(function(Nested memory) external returns (uint)[] calldata) external {}
|
||||
function i(Nested[] calldata) external {}
|
||||
}
|
||||
)";
|
||||
SourceUnit const* sourceUnit = parseAndAnalyse(text);
|
||||
@@ -340,7 +340,7 @@ BOOST_AUTO_TEST_CASE(string)
|
||||
char const* sourceCode = R"(
|
||||
contract C {
|
||||
string s;
|
||||
function f(string x) external { s = x; }
|
||||
function f(string calldata x) external { s = x; }
|
||||
}
|
||||
)";
|
||||
BOOST_CHECK_NO_THROW(parseAndAnalyse(sourceCode));
|
||||
|
||||
Reference in New Issue
Block a user