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

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

Issue 2767083002: fasta scanner recovery and error code translation improvements (Closed)
Patch Set: revert address comments and fix for token_stream_rewriter test 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/test/scanner_replacement_test.dart ('k') | pkg/front_end/tool/fasta_perf.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/front_end/test/scanner_test.dart
diff --git a/pkg/front_end/test/scanner_test.dart b/pkg/front_end/test/scanner_test.dart
index 479c40ec9f92cb3be395576163b7eef75e1b174c..b1bcdb290b86f9773c875f9cde38b646f9f99f65 100644
--- a/pkg/front_end/test/scanner_test.dart
+++ b/pkg/front_end/test/scanner_test.dart
@@ -165,12 +165,16 @@ abstract class ScannerTestBase {
_assertToken(TokenType.AMPERSAND_EQ, "&=");
}
- void test_angle_brackets_are_ordinary_tokens() {
- // Analyzer's token streams don't consider "<" to be an opener.
- var lessThan = _scan('<>');
- var greaterThan = lessThan.next;
+ void test_angle_brackets() {
+ var lessThan = _scan('<String>');
+ var identifier = lessThan.next;
+ var greaterThan = identifier.next;
expect(greaterThan.next.type, TokenType.EOF);
- expect(lessThan, isNot(new isInstanceOf<BeginToken>()));
+ // Analyzer's token streams don't consider "<" to be an opener
+ // but fasta does.
+ if (lessThan is BeginToken) {
+ expect(lessThan.endToken, greaterThan);
+ }
expect(greaterThan, isNot(new isInstanceOf<BeginToken>()));
}
« no previous file with comments | « pkg/front_end/test/scanner_replacement_test.dart ('k') | pkg/front_end/tool/fasta_perf.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698