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

Side by Side Diff: pkg/front_end/test/fasta/translate_uri_test.dart

Issue 2890883002: Fix for resolving 'bar.dart' against 'dart:foo'. Test for TranslateUri. (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 unified diff | Download patch
« no previous file with comments | « pkg/front_end/lib/src/incremental/file_state.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'package:front_end/src/fasta/translate_uri.dart';
6 import 'package:test/test.dart';
7 import 'package:test_reflective_loader/test_reflective_loader.dart';
8
9 main() {
10 defineReflectiveSuite(() {
11 defineReflectiveTests(TranslateUriTest);
12 });
13 }
14
15 @reflectiveTest
16 class TranslateUriTest {
17 void test_translate_dart() {
18 var translator = new TranslateUri({}, {
19 'core': Uri.parse('file:///sdk/core/core.dart'),
20 'math': Uri.parse('file:///sdk/math/math.dart')
21 });
22
23 expect(translator.translate(Uri.parse('dart:core')),
24 Uri.parse('file:///sdk/core/core.dart'));
25 expect(translator.translate(Uri.parse('dart:core/string.dart')),
26 Uri.parse('file:///sdk/core/string.dart'));
27
28 expect(translator.translate(Uri.parse('dart:math')),
29 Uri.parse('file:///sdk/math/math.dart'));
30
31 expect(translator.translate(Uri.parse('dart:unknown')), isNull);
32 }
33 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/incremental/file_state.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698