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

Unified Diff: tests/compiler/dart2js/scanner_offset_length_test.dart

Issue 27510003: Scanner for UTF-8 byte arrays (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fixes compiler tests Created 7 years, 2 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: tests/compiler/dart2js/scanner_offset_length_test.dart
diff --git a/tests/compiler/dart2js/scanner_offset_length_test.dart b/tests/compiler/dart2js/scanner_offset_length_test.dart
index 6f8db2450428b623d663b2139597e6e751df9d25..798057dedacc7e528ede97a03d85cd9cb2a7f39c 100644
--- a/tests/compiler/dart2js/scanner_offset_length_test.dart
+++ b/tests/compiler/dart2js/scanner_offset_length_test.dart
@@ -4,18 +4,17 @@
import "package:expect/expect.dart";
import '../../../sdk/lib/_internal/compiler/implementation/scanner/scannerlib.dart';
-import '../../../sdk/lib/_internal/compiler/implementation/scanner/scanner_implementation.dart';
Token scan(String text) =>
- new StringScanner(text, includeComments: true).tokenize();
+ new StringScanner.fromString(text, includeComments: true).tokenize();
check(String text) {
Token token = scan(text);
while (token.kind != EOF_TOKEN) {
- Expect.equals(token.slowToString().length, token.slowCharCount);
+ Expect.equals(token.value.length, token.charCount);
var start = token.charOffset;
- var end = token.charOffset + token.slowCharCount;
+ var end = token.charOffset + token.charCount;
Expect.isTrue(start < text.length,
'start=$start < text.length=${text.length}: $text');
@@ -27,8 +26,8 @@ check(String text) {
var substring = text.substring(start, end);
- Expect.stringEquals(token.slowToString(), substring,
- 'token.slowToString()=${token.slowToString()} == '
+ Expect.stringEquals(token.value, substring,
+ 'token.value=${token.value} == '
'text.substring(start,end)=${substring}: $text');
print('$text: [$start,$end]:$token');

Powered by Google App Engine
This is Rietveld 408576698