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

Unified Diff: pkg/front_end/test/fasta/uri_translator_test.dart

Issue 2986303003: Switch FE to use the libraries.json format. (Closed)
Patch Set: Created 3 years, 4 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: pkg/front_end/test/fasta/uri_translator_test.dart
diff --git a/pkg/front_end/test/fasta/uri_translator_test.dart b/pkg/front_end/test/fasta/uri_translator_test.dart
index 27ca3c868e130790bc82921e854e6fc8b2d1680c..cd8f198a102639859db71388843450e6e53a3cad 100644
--- a/pkg/front_end/test/fasta/uri_translator_test.dart
+++ b/pkg/front_end/test/fasta/uri_translator_test.dart
@@ -2,6 +2,7 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+import 'package:front_end/src/base/libraries_spec.dart';
import 'package:front_end/src/fasta/uri_translator_impl.dart';
import 'package:package_config/packages.dart';
import 'package:test/test.dart';
@@ -15,12 +16,16 @@ main() {
@reflectiveTest
class UriTranslatorImplTest {
- void test_isPlatformImplementation() {
- var translator = new UriTranslatorImpl({
- 'core': Uri.parse('file:///sdk/core/core.dart'),
- 'math': Uri.parse('file:///sdk/math/math.dart')
- }, {}, Packages.noPackages);
+ UriTranslatorImpl translator = new UriTranslatorImpl(
+ new TargetLibrariesSpecification('vm', {
+ 'core': new LibraryInfo(
+ 'core', Uri.parse('file:///sdk/core/core.dart'), const []),
ahe 2017/08/03 11:58:16 These aren't names of real files. Please don't use
Siggi Cherem (dart-lang) 2017/08/05 00:41:02 Ack. See other comment, I left this as it was in t
+ 'math': new LibraryInfo(
+ 'core', Uri.parse('file:///sdk/math/math.dart'), const []),
+ }),
+ Packages.noPackages);
+ void test_isPlatformImplementation() {
bool isPlatform(String uriStr) {
var uri = Uri.parse(uriStr);
return translator.isPlatformImplementation(uri);
@@ -33,11 +38,6 @@ class UriTranslatorImplTest {
}
void test_translate_dart() {
- var translator = new UriTranslatorImpl({
- 'core': Uri.parse('file:///sdk/core/core.dart'),
- 'math': Uri.parse('file:///sdk/math/math.dart')
- }, {}, Packages.noPackages);
-
expect(translator.translate(Uri.parse('dart:core')),
Uri.parse('file:///sdk/core/core.dart'));
expect(translator.translate(Uri.parse('dart:core/string.dart')),

Powered by Google App Engine
This is Rietveld 408576698