OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // Test that the compiler can handle imports when package root has not been set. | 5 // Test that the compiler can handle imports when package root has not been set. |
6 | 6 |
7 library dart2js.test.package_root; | 7 library dart2js.test.package_root; |
8 | 8 |
9 import 'dart:async'; | 9 import 'dart:async'; |
10 | 10 |
11 import 'package:async_helper/async_helper.dart'; | 11 import 'package:async_helper/async_helper.dart'; |
12 import 'package:expect/expect.dart'; | 12 import 'package:expect/expect.dart'; |
13 import 'package:compiler/compiler.dart' | 13 import 'package:compiler/compiler.dart' |
14 show DiagnosticHandler, Diagnostic, PackagesDiscoveryProvider; | 14 show DiagnosticHandler, Diagnostic, PackagesDiscoveryProvider; |
15 import 'package:compiler/src/dart2jslib.dart' | 15 import 'package:compiler/src/messages.dart' |
16 show MessageKind; | 16 show MessageKind; |
17 import 'package:package_config/packages.dart'; | 17 import 'package:package_config/packages.dart'; |
18 | 18 |
19 import 'memory_compiler.dart'; | 19 import 'memory_compiler.dart'; |
20 import 'memory_source_file_helper.dart'; | 20 import 'memory_source_file_helper.dart'; |
21 | 21 |
22 const MEMORY_SOURCE_FILES = const { | 22 const MEMORY_SOURCE_FILES = const { |
23 'main.dart': ''' | 23 'main.dart': ''' |
24 | 24 |
25 import 'package:foo/foo.dart'; | 25 import 'package:foo/foo.dart'; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 await runTest( | 80 await runTest( |
81 Uri.parse('package:foo/foo.dart'), | 81 Uri.parse('package:foo/foo.dart'), |
82 MessageKind.LIBRARY_NOT_FOUND, | 82 MessageKind.LIBRARY_NOT_FOUND, |
83 packageConfig: PACKAGE_CONFIG_URI); | 83 packageConfig: PACKAGE_CONFIG_URI); |
84 await runTest( | 84 await runTest( |
85 Uri.parse('package:foo/foo.dart'), | 85 Uri.parse('package:foo/foo.dart'), |
86 MessageKind.LIBRARY_NOT_FOUND, | 86 MessageKind.LIBRARY_NOT_FOUND, |
87 packagesDiscoveryProvider: noPackagesDiscovery); | 87 packagesDiscoveryProvider: noPackagesDiscovery); |
88 }); | 88 }); |
89 } | 89 } |
OLD | NEW |