mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Extract tests.
This commit is contained in:
parent
39b7b44a8d
commit
17beac1e07
@ -2993,21 +2993,6 @@ BOOST_AUTO_TEST_CASE(literal_strings)
|
||||
CHECK_SUCCESS(text);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(memory_structs_with_mappings)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract Test {
|
||||
struct S { uint8 a; mapping(uint => uint) b; uint8 c; }
|
||||
S s;
|
||||
function f() public {
|
||||
S memory x;
|
||||
x.b[1];
|
||||
}
|
||||
}
|
||||
)";
|
||||
CHECK_ERROR(text, TypeError, "Member \"b\" is not available in struct Test.S memory outside of storage.");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(string_bytes_conversion)
|
||||
{
|
||||
char const* text = R"(
|
||||
|
@ -0,0 +1,10 @@
|
||||
contract Test {
|
||||
struct S { uint8 a; mapping(uint => uint) b; uint8 c; }
|
||||
S s;
|
||||
function f() public {
|
||||
S memory x;
|
||||
x.b[1];
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (118-121): Member "b" is not available in struct Test.S memory outside of storage.
|
Loading…
Reference in New Issue
Block a user