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

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

Issue 2701723002: fix token type of first token in converted token stream (Closed)
Patch Set: merge Created 3 years, 10 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/fasta/analyzer/token_utils.dart ('k') | no next file » | 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 d853ee87f741c4768ba7904809aa74b39c9c91f2..479c40ec9f92cb3be395576163b7eef75e1b174c 100644
--- a/pkg/front_end/test/scanner_test.dart
+++ b/pkg/front_end/test/scanner_test.dart
@@ -932,12 +932,17 @@ abstract class ScannerTestBase {
void test_startAndEnd() {
Token token = _scan("a");
+ expect(token.offset, 0);
Token previous = token.previous;
expect(previous.next, token);
expect(previous.previous, previous);
+ expect(previous.type, TokenType.EOF);
+ expect(previous.offset, -1);
Token next = token.next;
expect(next.next, next);
expect(next.previous, token);
+ expect(next.type, TokenType.EOF);
+ expect(next.offset, token.offset + token.length);
}
void test_string_multi_double() {
« no previous file with comments | « pkg/front_end/lib/src/fasta/analyzer/token_utils.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698