Add a recovery test based on reported failure (and fix a minor bug)

Change-Id: Ieaa0309559f7b2cc5c24741f16194c98f9ba0df2
Reviewed-on: https://dart-review.googlesource.com/51960
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Brian Wilkerson 2018-04-19 18:47:19 +00:00 committed by commit-bot@chromium.org
parent 2048137583
commit 1a56d6534c
2 changed files with 14 additions and 1 deletions

View file

@ -1792,7 +1792,7 @@ class AstComparator implements AstVisitor<bool> {
isEqualTokens(node.modifierKeyword, other.modifierKeyword) &&
isEqualNodes(node.returnType, other.returnType) &&
isEqualTokens(node.propertyKeyword, other.propertyKeyword) &&
isEqualTokens(node.propertyKeyword, other.propertyKeyword) &&
isEqualTokens(node.operatorKeyword, other.operatorKeyword) &&
isEqualNodes(node.name, other.name) &&
isEqualNodes(node.parameters, other.parameters) &&
isEqualNodes(node.body, other.body);

View file

@ -293,6 +293,19 @@ f(x) {
testUserDefinableOperatorWithSuper('-');
}
@failingTest
void test_missingGet() {
testRecovery('''
class Bar {
int foo => 0;
}
''', [ParserErrorCode.MISSING_GET], '''
class Bar {
int get foo => 0;
}
''');
}
@failingTest
void test_parameterList_leftParen() {
// https://github.com/dart-lang/sdk/issues/22938