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 84d7c631442b9e6c332661095529be64404fa8bd..f92e3c6df7e7f736a1da38c61edc63de6e8fde5d 100644 |
--- a/pkg/analyzer/test/generated/parser_test.dart |
+++ b/pkg/analyzer/test/generated/parser_test.dart |
@@ -7605,7 +7605,12 @@ abstract class FormalParameterParserTestMixin |
NormalFormalParameter parameter = |
parseNormalFormalParameter('const this.a'); |
expect(parameter, isNotNull); |
- assertNoErrors(); |
+ if (usingFastaParser) { |
+ // TODO(danrubel): should not be generating an error |
+ assertErrorsWithCodes([ParserErrorCode.UNEXPECTED_TOKEN]); |
+ } else { |
+ assertNoErrors(); |
+ } |
expect(parameter, new isInstanceOf<FieldFormalParameter>()); |
FieldFormalParameter fieldParameter = parameter; |
expect(fieldParameter.keyword, isNotNull); |
@@ -7618,7 +7623,12 @@ abstract class FormalParameterParserTestMixin |
NormalFormalParameter parameter = |
parseNormalFormalParameter('const A this.a'); |
expect(parameter, isNotNull); |
- assertNoErrors(); |
+ if (usingFastaParser) { |
+ // TODO(danrubel): should not be generating an error |
+ assertErrorsWithCodes([ParserErrorCode.UNEXPECTED_TOKEN]); |
+ } else { |
+ assertNoErrors(); |
+ } |
expect(parameter, new isInstanceOf<FieldFormalParameter>()); |
FieldFormalParameter fieldParameter = parameter; |
expect(fieldParameter.keyword, isNotNull); |
@@ -7974,7 +7984,12 @@ abstract class FormalParameterParserTestMixin |
void test_parseNormalFormalParameter_simple_const_noType() { |
NormalFormalParameter parameter = parseNormalFormalParameter('const a'); |
expect(parameter, isNotNull); |
- assertNoErrors(); |
+ if (usingFastaParser) { |
+ // TODO(danrubel): should not be generating an error |
+ assertErrorsWithCodes([ParserErrorCode.UNEXPECTED_TOKEN]); |
+ } else { |
+ assertNoErrors(); |
+ } |
expect(parameter, new isInstanceOf<SimpleFormalParameter>()); |
SimpleFormalParameter simpleParameter = parameter; |
expect(simpleParameter.keyword, isNotNull); |
@@ -7985,7 +8000,12 @@ abstract class FormalParameterParserTestMixin |
void test_parseNormalFormalParameter_simple_const_type() { |
NormalFormalParameter parameter = parseNormalFormalParameter('const A a'); |
expect(parameter, isNotNull); |
- assertNoErrors(); |
+ if (usingFastaParser) { |
+ // TODO(danrubel): should not be generating an error |
+ assertErrorsWithCodes([ParserErrorCode.UNEXPECTED_TOKEN]); |
+ } else { |
+ assertNoErrors(); |
+ } |
expect(parameter, new isInstanceOf<SimpleFormalParameter>()); |
SimpleFormalParameter simpleParameter = parameter; |
expect(simpleParameter.keyword, isNotNull); |
@@ -13765,7 +13785,12 @@ abstract class TopLevelParserTestMixin implements AbstractParserTestCase { |
createParser('operator<dynamic> _operator = new operator.A();'); |
CompilationUnit unit = parser.parseCompilationUnit2(); |
expect(unit, isNotNull); |
- assertNoErrors(); |
+ if (usingFastaParser) { |
+ // TODO(danrubel): should not be generating an error |
+ assertErrorsWithCodes([ParserErrorCode.EXPECTED_TYPE_NAME]); |
+ } else { |
+ assertNoErrors(); |
+ } |
expect(unit.scriptTag, isNull); |
expect(unit.directives, hasLength(0)); |
expect(unit.declarations, hasLength(1)); |
@@ -13809,7 +13834,12 @@ abstract class TopLevelParserTestMixin implements AbstractParserTestCase { |
createParser('typedef.A _typedef = new typedef.A();'); |
CompilationUnit unit = parser.parseCompilationUnit2(); |
expect(unit, isNotNull); |
- assertNoErrors(); |
+ if (usingFastaParser) { |
+ // TODO(danrubel): should not be generating an error |
+ assertErrorsWithCodes([ParserErrorCode.EXPECTED_TYPE_NAME]); |
+ } else { |
+ assertNoErrors(); |
+ } |
expect(unit.scriptTag, isNull); |
expect(unit.directives, hasLength(0)); |
expect(unit.declarations, hasLength(1)); |
@@ -13819,7 +13849,12 @@ abstract class TopLevelParserTestMixin implements AbstractParserTestCase { |
createParser('abstract.A _abstract = new abstract.A();'); |
CompilationUnitMember member = parseFullCompilationUnitMember(); |
expect(member, isNotNull); |
- assertNoErrors(); |
+ if (usingFastaParser) { |
+ // TODO(danrubel): should not be generating an error |
+ assertErrorsWithCodes([ParserErrorCode.EXPECTED_TYPE_NAME]); |
+ } else { |
+ assertNoErrors(); |
+ } |
expect(member, new isInstanceOf<TopLevelVariableDeclaration>()); |
TopLevelVariableDeclaration declaration = member; |
expect(declaration.semicolon, isNotNull); |