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

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

Issue 2982593002: Rename TranslateUri to UriTranslator, rename files, extract Impl. (Closed)
Patch Set: Created 3 years, 5 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/translate_uri_test.dart
diff --git a/pkg/front_end/test/fasta/translate_uri_test.dart b/pkg/front_end/test/fasta/translate_uri_test.dart
deleted file mode 100644
index 139936d51552961b3a0e3a21922d8f2388c720a8..0000000000000000000000000000000000000000
--- a/pkg/front_end/test/fasta/translate_uri_test.dart
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
-// 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/fasta/translate_uri.dart';
-import 'package:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-main() {
- defineReflectiveSuite(() {
- defineReflectiveTests(TranslateUriTest);
- });
-}
-
-@reflectiveTest
-class TranslateUriTest {
- void test_isPlatformImplementation() {
- var translator = new TranslateUri({
- 'core': Uri.parse('file:///sdk/core/core.dart'),
- 'math': Uri.parse('file:///sdk/math/math.dart')
- }, {}, {});
-
- bool isPlatform(String uriStr) {
- var uri = Uri.parse(uriStr);
- return translator.isPlatformImplementation(uri);
- }
-
- expect(isPlatform('dart:core/string.dart'), isTrue);
- expect(isPlatform('dart:core'), isFalse);
- expect(isPlatform('dart:_builtin'), isTrue);
- expect(isPlatform('file:///sdk/math/math.dart'), isFalse);
- }
-
- void test_translate_dart() {
- var translator = new TranslateUri({
- 'core': Uri.parse('file:///sdk/core/core.dart'),
- 'math': Uri.parse('file:///sdk/math/math.dart')
- }, {}, {});
-
- expect(translator.translate(Uri.parse('dart:core')),
- Uri.parse('file:///sdk/core/core.dart'));
- expect(translator.translate(Uri.parse('dart:core/string.dart')),
- Uri.parse('file:///sdk/core/string.dart'));
-
- expect(translator.translate(Uri.parse('dart:math')),
- Uri.parse('file:///sdk/math/math.dart'));
- }
-}

Powered by Google App Engine
This is Rietveld 408576698