mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Move "create2_as_variable" back to non-isoltest tests.
This commit is contained in:
parent
283cdef98c
commit
1ce40f4089
@ -402,6 +402,21 @@ BOOST_AUTO_TEST_CASE(returndatasize_as_variable)
|
||||
CHECK_ALLOW_MULTI(text, expectations);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(create2_as_variable)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract c { function f() public { uint create2; assembly { create2(0, 0, 0, 0) } }}
|
||||
)";
|
||||
// This needs special treatment, because the message mentions the EVM version,
|
||||
// so cannot be run via isoltest.
|
||||
CHECK_ALLOW_MULTI(text, (std::vector<std::pair<Error::Type, std::string>>{
|
||||
{Error::Type::Warning, "Variable is shadowed in inline assembly by an instruction of the same name"},
|
||||
{Error::Type::Warning, "The \"create2\" instruction is not supported by the VM version"},
|
||||
{Error::Type::DeclarationError, "Unbalanced stack"},
|
||||
{Error::Type::Warning, "not supposed to return values"}
|
||||
}));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(getter_is_memory_type)
|
||||
{
|
||||
char const* text = R"(
|
||||
|
@ -1,6 +0,0 @@
|
||||
contract c { function f() public { uint create2; assembly { create2(0, 0, 0, 0) } }}
|
||||
// ----
|
||||
// Warning: (35-47): Variable is shadowed in inline assembly by an instruction of the same name
|
||||
// Warning: (60-79): The "create2" instruction is not supported by the VM version "byzantium" you are currently compiling for. It will be interpreted as an invalid instruction on this VM.
|
||||
// Warning: (60-79): Top-level expressions are not supposed to return values (this expression returns 1 value). Use ``pop()`` or assign them.
|
||||
// DeclarationError: (58-81): Unbalanced stack at the end of a block: 1 surplus item(s).
|
Loading…
Reference in New Issue
Block a user