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

Unified Diff: pkg/front_end/test/scanner_roundtrip_test.dart

Issue 2746023003: fasta.Keyword implement analyzer.Keyword (Closed)
Patch Set: merge Created 3 years, 9 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
« no previous file with comments | « pkg/front_end/lib/src/scanner/token.dart ('k') | pkg/front_end/test/subpackage_relationships_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/test/scanner_roundtrip_test.dart
diff --git a/pkg/front_end/test/scanner_roundtrip_test.dart b/pkg/front_end/test/scanner_roundtrip_test.dart
index 398376b8efc7b8c0d34c3955118cebf7c295f08e..aa3d3d385518d5d4ecbc1465a1df49b432f933ee 100644
--- a/pkg/front_end/test/scanner_roundtrip_test.dart
+++ b/pkg/front_end/test/scanner_roundtrip_test.dart
@@ -4,6 +4,7 @@
import 'package:front_end/src/fasta/analyzer/token_utils.dart';
import 'package:front_end/src/scanner/token.dart';
+import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
import 'scanner_fasta_test.dart';
@@ -90,4 +91,30 @@ class ScannerTest_RoundTrip extends ScannerTest {
// TODO(paulberry,ahe): Fasta scanner doesn't support script tag
super.test_scriptTag_withSpace();
}
+
+ void test_pseudo_keywords() {
+ var pseudoAnalyzerKeywords = new Set<Keyword>.from([
+ Keyword.ABSTRACT,
+ Keyword.AS,
+ Keyword.COVARIANT,
+ Keyword.DEFERRED,
+ Keyword.DYNAMIC,
+ Keyword.EXPORT,
+ Keyword.EXTERNAL,
+ Keyword.FACTORY,
+ Keyword.GET,
+ Keyword.IMPLEMENTS,
+ Keyword.IMPORT,
+ Keyword.LIBRARY,
+ Keyword.OPERATOR,
+ Keyword.PART,
+ Keyword.SET,
+ Keyword.STATIC,
+ Keyword.TYPEDEF,
+ ]);
+ for (Keyword keyword in Keyword.values) {
+ expect(keyword.isPseudoKeyword, pseudoAnalyzerKeywords.contains(keyword),
+ reason: keyword.name);
+ }
+ }
}
« no previous file with comments | « pkg/front_end/lib/src/scanner/token.dart ('k') | pkg/front_end/test/subpackage_relationships_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698