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"; |
11 import 'memory_source_file_helper.dart'; | 11 import 'memory_source_file_helper.dart'; |
12 | 12 |
13 import 'package:compiler/implementation/dart2jslib.dart' | 13 import 'package:compiler/src/dart2jslib.dart' |
14 show NullSink; | 14 show NullSink; |
15 | 15 |
16 import 'package:compiler/compiler.dart' | 16 import 'package:compiler/compiler.dart' |
17 show DiagnosticHandler, Diagnostic; | 17 show DiagnosticHandler, Diagnostic; |
18 | 18 |
19 import 'dart:async'; | 19 import 'dart:async'; |
20 | 20 |
21 const MEMORY_SOURCE_FILES = const { | 21 const MEMORY_SOURCE_FILES = const { |
22 'main.dart': ''' | 22 'main.dart': ''' |
23 | 23 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 Expect.equals("Cannot resolve 'package:foo/foo.dart'. " | 62 Expect.equals("Cannot resolve 'package:foo/foo.dart'. " |
63 "Package root has not been set.", | 63 "Package root has not been set.", |
64 errors[0]); | 64 errors[0]); |
65 })); | 65 })); |
66 } | 66 } |
67 | 67 |
68 void main() { | 68 void main() { |
69 runCompiler(Uri.parse('memory:main.dart')); | 69 runCompiler(Uri.parse('memory:main.dart')); |
70 runCompiler(Uri.parse('package:foo/foo.dart')); | 70 runCompiler(Uri.parse('package:foo/foo.dart')); |
71 } | 71 } |
OLD | NEW |