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

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

Issue 2913043002: fix fasta scanner adapter lineStarts (Closed)
Patch Set: Created 3 years, 7 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/analyzer/test/generated/scanner_test.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_fasta_test.dart
diff --git a/pkg/front_end/test/scanner_fasta_test.dart b/pkg/front_end/test/scanner_fasta_test.dart
index f6b8cc1cacb3ff7144907705bfae43abdc31e21a..852c5151185aab03672c7cdb8108899d2dc14715 100644
--- a/pkg/front_end/test/scanner_fasta_test.dart
+++ b/pkg/front_end/test/scanner_fasta_test.dart
@@ -501,6 +501,14 @@ class ScannerTest_Fasta_Direct extends ScannerTest_Fasta_Base {
return scanner.tokenize();
}
+ void test_linestarts() {
+ var scanner = new fasta.StringScanner("var\r\ni\n=\n1;\n");
+ var token = scanner.tokenize();
+ expect(token.lexeme, 'var');
+ var lineStarts = scanner.lineStarts;
+ expect(lineStarts, orderedEquals([0, 5, 7, 9, 12, 13]));
+ }
+
test_unterminated_string_with_unterminated_interpolation() {
Token token = scan(r'"foo ${bar');
BeginToken interpolationStart = token.next;
« no previous file with comments | « pkg/analyzer/test/generated/scanner_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698