| 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 'package:expect/expect.dart'; | 9 import 'package:expect/expect.dart'; |
| 10 import "package:async_helper/async_helper.dart"; | 10 import "package:async_helper/async_helper.dart"; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 Compiler compiler = new Compiler(provider, | 53 Compiler compiler = new Compiler(provider, |
| 54 outputProvider, | 54 outputProvider, |
| 55 diagnosticHandler, | 55 diagnosticHandler, |
| 56 libraryRoot, | 56 libraryRoot, |
| 57 packageRoot, | 57 packageRoot, |
| 58 [], | 58 [], |
| 59 {}); | 59 {}); |
| 60 | 60 |
| 61 asyncTest(() => compiler.run(main).then((_) { | 61 asyncTest(() => compiler.run(main).then((_) { |
| 62 Expect.equals(1, errors.length); | 62 Expect.equals(1, errors.length); |
| 63 Expect.isTrue( | 63 Expect.isTrue(errors[0].contains("Error reading ")); |
| 64 errors[0].startsWith( | |
| 65 "Can't read 'package:foo/foo.dart' (Error reading ")); | |
| 66 })); | 64 })); |
| 67 } | 65 } |
| 68 | 66 |
| 69 void main() { | 67 void main() { |
| 70 runCompiler(Uri.parse('memory:main.dart')); | 68 runCompiler(Uri.parse('memory:main.dart')); |
| 71 runCompiler(Uri.parse('package:foo/foo.dart')); | 69 runCompiler(Uri.parse('package:foo/foo.dart')); |
| 72 } | 70 } |
| OLD | NEW |