Update existing tests.

This commit is contained in:
chriseth 2020-09-29 16:43:04 +02:00
parent b2be8e1c0f
commit b2f1d558da
10 changed files with 12 additions and 10 deletions

View File

@ -1,4 +1,4 @@
Error: Expected pragma, import directive or contract/interface/library/struct/enum/function definition.
Error: Expected pragma, import directive or contract/interface/library/struct/enum/constant/function definition.
--> recovery_ast_empty_contract/input.sol:3:1:
|
3 | c

View File

@ -1,4 +1,6 @@
pragma solidity ^99.99.0;
this is surely invalid
// ----
// ParserError 7858: (26-30): Expected pragma, import directive or contract/interface/library/struct/enum/function definition.
// ParserError 6635: (31-33): Expected identifier but got 'is'
// ParserError 6635: (34-40): Expected ';' but got identifier
// ParserError 6635: (49-49): Expected ';' but got end of source

View File

@ -4,6 +4,6 @@ contract C {
}
}
// ----
// DeclarationError 1788: (28-45): The "constant" keyword can only be used for state variables.
// DeclarationError 1788: (28-45): The "constant" keyword can only be used for state variables or variables at file level.
// TypeError 5462: (69-72): Invalid array length, expected integer literal or constant expression.
// TypeError 6651: (64-75): Data location must be "storage", "memory" or "calldata" for variable, but none was given.

View File

@ -1,3 +1,3 @@
constructor() {}
// ----
// ParserError 7858: (0-11): Expected pragma, import directive or contract/interface/library/struct/enum/function definition.
// ParserError 7858: (0-11): Expected pragma, import directive or contract/interface/library/struct/enum/constant/function definition.

View File

@ -1,3 +1,3 @@
fallback(){}
// ----
// ParserError 7858: (0-8): Expected pragma, import directive or contract/interface/library/struct/enum/function definition.
// ParserError 7858: (0-8): Expected pragma, import directive or contract/interface/library/struct/enum/constant/function definition.

View File

@ -1,3 +1,3 @@
receive() {}
// ----
// ParserError 7858: (0-7): Expected pragma, import directive or contract/interface/library/struct/enum/function definition.
// ParserError 7858: (0-7): Expected pragma, import directive or contract/interface/library/struct/enum/constant/function definition.

View File

@ -2,4 +2,4 @@ contract test {
function f(uint[] memory constant a) public { }
}
// ----
// DeclarationError 1788: (31-55): The "constant" keyword can only be used for state variables.
// DeclarationError 1788: (31-55): The "constant" keyword can only be used for state variables or variables at file level.

View File

@ -11,4 +11,4 @@ contract C {
}
}
// ----
// ParserError 2837: (290-295): Only state variables can have a docstring.
// ParserError 2837: (290-295): Only state variables or file-level variables can have a docstring.

View File

@ -2,4 +2,4 @@ contract Foo {
function f(uint[] storage constant x, uint[] memory y) internal { }
}
// ----
// DeclarationError 1788: (30-55): The "constant" keyword can only be used for state variables.
// DeclarationError 1788: (30-55): The "constant" keyword can only be used for state variables or variables at file level.

View File

@ -1,3 +1,3 @@
unexpected
// ----
// ParserError 7858: (0-10): Expected pragma, import directive or contract/interface/library/struct/enum/function definition.
// ParserError 7858: (0-10): Expected pragma, import directive or contract/interface/library/struct/enum/constant/function definition.