| Index: pkg/analyzer/test/generated/parser_test.dart
|
| diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
|
| index 710be9b836ef5c5038ab7409b5f95b6b923ec6ed..26e424c9d0e76dfee4d6507d9f75d2affedac964 100644
|
| --- a/pkg/analyzer/test/generated/parser_test.dart
|
| +++ b/pkg/analyzer/test/generated/parser_test.dart
|
| @@ -4016,6 +4016,33 @@ class C {
|
| expect(metadata[0].name.name, "override");
|
| }
|
|
|
| + void test_missingSemicolon_varialeDeclarationList() {
|
| + void verify(CompilationUnitMember member, String expectedTypeName,
|
| + String expectedName, String expectedSemicolon) {
|
| + expect(member, new isInstanceOf<TopLevelVariableDeclaration>());
|
| + TopLevelVariableDeclaration declaration = member;
|
| + VariableDeclarationList variableList = declaration.variables;
|
| + expect(variableList, isNotNull);
|
| + NodeList<VariableDeclaration> variables = variableList.variables;
|
| + expect(variables, hasLength(1));
|
| + VariableDeclaration variable = variables[0];
|
| + expect(variableList.type.toString(), expectedTypeName);
|
| + expect(variable.name.name, expectedName);
|
| + expect(declaration.semicolon.lexeme, expectedSemicolon);
|
| + }
|
| +
|
| + CompilationUnit unit = ParserTestCase.parseCompilationUnit(
|
| + 'String n x = "";', [
|
| + ParserErrorCode.EXPECTED_TOKEN,
|
| + ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE
|
| + ]);
|
| + expect(unit, isNotNull);
|
| + NodeList<CompilationUnitMember> declarations = unit.declarations;
|
| + expect(declarations, hasLength(2));
|
| + verify(declarations[0], 'String', 'n', '');
|
| + verify(declarations[1], 'null', 'x', ';');
|
| + }
|
| +
|
| void test_multiplicativeExpression_missing_LHS() {
|
| BinaryExpression expression =
|
| parseExpression("* y", [ParserErrorCode.MISSING_IDENTIFIER]);
|
|
|