mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
InlineAssembly: Extracting tests for name clashes.
This commit is contained in:
@@ -228,30 +228,6 @@ BOOST_AUTO_TEST_CASE(opcode_for_function_args)
|
||||
CHECK_PARSE_ERROR("{ function f() -> gas { } }", ParserError, "Cannot use builtin");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(name_clashes)
|
||||
{
|
||||
CHECK_PARSE_ERROR("{ let g := 2 function g() { } }", DeclarationError, "Variable name g already taken in this scope");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(name_clashes_function_subscope)
|
||||
{
|
||||
CHECK_PARSE_ERROR("{ function g() { function g() {} } }", DeclarationError, "Function name g already taken in this scope");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(name_clashes_function_subscope_reverse)
|
||||
{
|
||||
CHECK_PARSE_ERROR("{ { function g() {} } function g() { } }", DeclarationError, "Function name g already taken in this scope");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(name_clashes_function_variable_subscope)
|
||||
{
|
||||
CHECK_PARSE_ERROR("{ function g() { let g := 0 } }", DeclarationError, "Variable name g already taken in this scope");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(name_clashes_function_variable_subscope_reverse)
|
||||
{
|
||||
CHECK_PARSE_ERROR("{ { let g := 0 } function g() { } }", DeclarationError, "Variable name g already taken in this scope");
|
||||
}
|
||||
BOOST_AUTO_TEST_CASE(variable_access_cross_functions)
|
||||
{
|
||||
CHECK_PARSE_ERROR("{ let x := 2 function g() { pop(x) } }", DeclarationError, "Identifier not found.");
|
||||
|
||||
Reference in New Issue
Block a user