| 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' show PackagesDiscoveryProvider; |
| 14 show DiagnosticHandler, Diagnostic, PackagesDiscoveryProvider; | |
| 15 import 'package:compiler/src/diagnostics/messages.dart' show MessageKind; | 14 import 'package:compiler/src/diagnostics/messages.dart' show MessageKind; |
| 16 import 'package:package_config/packages.dart'; | 15 import 'package:package_config/packages.dart'; |
| 17 | 16 |
| 18 import 'memory_compiler.dart'; | 17 import 'memory_compiler.dart'; |
| 19 import 'memory_source_file_helper.dart'; | 18 import 'memory_source_file_helper.dart'; |
| 20 | 19 |
| 21 const MEMORY_SOURCE_FILES = const { | 20 const MEMORY_SOURCE_FILES = const { |
| 22 'main.dart': ''' | 21 'main.dart': ''' |
| 23 | 22 |
| 24 import 'package:foo/foo.dart'; | 23 import 'package:foo/foo.dart'; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 Uri.parse('package:foo/foo.dart'), MessageKind.READ_SELF_ERROR, | 68 Uri.parse('package:foo/foo.dart'), MessageKind.READ_SELF_ERROR, |
| 70 packageRoot: packageRoot); | 69 packageRoot: packageRoot); |
| 71 await runTest( | 70 await runTest( |
| 72 Uri.parse('package:foo/foo.dart'), MessageKind.LIBRARY_NOT_FOUND, | 71 Uri.parse('package:foo/foo.dart'), MessageKind.LIBRARY_NOT_FOUND, |
| 73 packageConfig: PACKAGE_CONFIG_URI); | 72 packageConfig: PACKAGE_CONFIG_URI); |
| 74 await runTest( | 73 await runTest( |
| 75 Uri.parse('package:foo/foo.dart'), MessageKind.LIBRARY_NOT_FOUND, | 74 Uri.parse('package:foo/foo.dart'), MessageKind.LIBRARY_NOT_FOUND, |
| 76 packagesDiscoveryProvider: noPackagesDiscovery); | 75 packagesDiscoveryProvider: noPackagesDiscovery); |
| 77 }); | 76 }); |
| 78 } | 77 } |
| OLD | NEW |