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

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

Issue 2647343003: Update dart2js unit tests to dart_parser and dart_scanner. (Closed)
Patch Set: Address review comments. Created 3 years, 11 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 | « tests/compiler/dart2js/scanner_offset_length_test.dart ('k') | tests/compiler/dart2js/unparser2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/scanner_test.dart
diff --git a/tests/compiler/dart2js/scanner_test.dart b/tests/compiler/dart2js/scanner_test.dart
index ae5dfd3496e0804a9ea6313b56d54bb6be7b42e2..75150753db3a298d685cf2b7737a4a0403b66de9 100644
--- a/tests/compiler/dart2js/scanner_test.dart
+++ b/tests/compiler/dart2js/scanner_test.dart
@@ -3,17 +3,17 @@
// BSD-style license that can be found in the LICENSE file.
import "package:expect/expect.dart";
-import 'package:compiler/src/scanner/utf8_bytes_scanner.dart';
-import 'package:compiler/src/tokens/precedence_constants.dart';
-import 'package:compiler/src/tokens/token.dart';
-import 'package:compiler/src/util/characters.dart';
+import 'package:dart_scanner/dart_scanner.dart';
+import 'package:dart_scanner/src/characters.dart';
+import 'package:dart_scanner/src/precedence.dart';
import 'dart:typed_data';
+
Token scan(List<int> bytes) {
List<int> zeroTerminated = new Uint8List(bytes.length + 1);
zeroTerminated.setRange(0, bytes.length, bytes);
zeroTerminated[bytes.length] = 0;
- return new Utf8BytesScanner.fromBytes(zeroTerminated).tokenize();
+ return new Utf8BytesScanner(zeroTerminated).tokenize();
}
Token scanUTF8(List<int> bytes) {
@@ -26,7 +26,7 @@ Token scanUTF8(List<int> bytes) {
for (int i = 0; i < l; i++) {
stringLiteral[i + 1] = bytes[i];
}
- return new Utf8BytesScanner.fromBytes(stringLiteral).tokenize();
+ return new Utf8BytesScanner(stringLiteral).tokenize();
}
bool isRunningOnJavaScript() => identical(1, 1.0);
« no previous file with comments | « tests/compiler/dart2js/scanner_offset_length_test.dart ('k') | tests/compiler/dart2js/unparser2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698