Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1543)

Unified Diff: pkg/analyzer/test/generated/parser_test.dart

Issue 1909843002: Pull the 'keyword' property into Token. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 a0b7fdd12098b2ffb0257de75c3fc62ff49ce777..47be73fe0958fa1e45b0c0b09074a995a5e28bc2 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -3699,7 +3699,7 @@ class C {
(obj) => obj is FieldDeclaration, FieldDeclaration, classMember);
VariableDeclarationList fieldList =
(classMember as FieldDeclaration).fields;
- expect((fieldList.keyword as KeywordToken).keyword, Keyword.CONST);
+ expect(fieldList.keyword.keyword, Keyword.CONST);
NodeList<VariableDeclaration> fields = fieldList.variables;
expect(fields, hasLength(1));
VariableDeclaration field = fields[0];
@@ -3725,7 +3725,7 @@ class C {
(obj) => obj is FieldDeclaration, FieldDeclaration, classMember);
VariableDeclarationList fieldList =
(classMember as FieldDeclaration).fields;
- expect((fieldList.keyword as KeywordToken).keyword, Keyword.FINAL);
+ expect(fieldList.keyword.keyword, Keyword.FINAL);
NodeList<VariableDeclaration> fields = fieldList.variables;
expect(fields, hasLength(1));
VariableDeclaration field = fields[0];
@@ -3751,7 +3751,7 @@ class C {
(obj) => obj is FieldDeclaration, FieldDeclaration, classMember);
VariableDeclarationList fieldList =
(classMember as FieldDeclaration).fields;
- expect((fieldList.keyword as KeywordToken).keyword, Keyword.VAR);
+ expect(fieldList.keyword.keyword, Keyword.VAR);
NodeList<VariableDeclaration> fields = fieldList.variables;
expect(fields, hasLength(1));
VariableDeclaration field = fields[0];
@@ -7505,7 +7505,7 @@ void''');
Token keyword = result.keyword;
expect(keyword, isNotNull);
expect(keyword.type, TokenType.KEYWORD);
- expect((keyword as KeywordToken).keyword, Keyword.CONST);
+ expect(keyword.keyword, Keyword.CONST);
expect(result.type, isNull);
}
@@ -7515,7 +7515,7 @@ void''');
Token keyword = result.keyword;
expect(keyword, isNotNull);
expect(keyword.type, TokenType.KEYWORD);
- expect((keyword as KeywordToken).keyword, Keyword.CONST);
+ expect(keyword.keyword, Keyword.CONST);
expect(result.type, isNotNull);
}
@@ -7525,7 +7525,7 @@ void''');
Token keyword = result.keyword;
expect(keyword, isNotNull);
expect(keyword.type, TokenType.KEYWORD);
- expect((keyword as KeywordToken).keyword, Keyword.FINAL);
+ expect(keyword.keyword, Keyword.FINAL);
expect(result.type, isNull);
}
@@ -7535,7 +7535,7 @@ void''');
Token keyword = result.keyword;
expect(keyword, isNotNull);
expect(keyword.type, TokenType.KEYWORD);
- expect((keyword as KeywordToken).keyword, Keyword.FINAL);
+ expect(keyword.keyword, Keyword.FINAL);
expect(result.type, isNotNull);
}
@@ -7545,7 +7545,7 @@ void''');
Token keyword = result.keyword;
expect(keyword, isNotNull);
expect(keyword.type, TokenType.KEYWORD);
- expect((keyword as KeywordToken).keyword, Keyword.FINAL);
+ expect(keyword.keyword, Keyword.FINAL);
expect(result.type, isNotNull);
}
@@ -7590,7 +7590,7 @@ void''');
Token keyword = result.keyword;
expect(keyword, isNotNull);
expect(keyword.type, TokenType.KEYWORD);
- expect((keyword as KeywordToken).keyword, Keyword.VAR);
+ expect(keyword.keyword, Keyword.VAR);
expect(result.type, isNull);
}

Powered by Google App Engine
This is Rietveld 408576698