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.missing_file; | 7 library dart2js.test.missing_file; |
8 | 8 |
9 import 'dart:async'; | 9 import 'dart:async'; |
10 import 'package:async_helper/async_helper.dart'; | 10 import 'package:async_helper/async_helper.dart'; |
11 import "package:compiler/src/messages.dart"; | 11 import "package:compiler/src/diagnostics/messages.dart"; |
12 import 'package:expect/expect.dart'; | 12 import 'package:expect/expect.dart'; |
13 import 'memory_compiler.dart'; | 13 import 'memory_compiler.dart'; |
14 | 14 |
15 const MEMORY_SOURCE_FILES = const { | 15 const MEMORY_SOURCE_FILES = const { |
16 'main.dart': ''' | 16 'main.dart': ''' |
17 | 17 |
18 import 'foo.dart'; | 18 import 'foo.dart'; |
19 | 19 |
20 main() {} | 20 main() {} |
21 ''', | 21 ''', |
(...skipping 17 matching lines...) Expand all Loading... |
39 void main() { | 39 void main() { |
40 asyncTest(() async { | 40 asyncTest(() async { |
41 await runTest( | 41 await runTest( |
42 Uri.parse('memory:main.dart'), MessageKind.READ_SCRIPT_ERROR); | 42 Uri.parse('memory:main.dart'), MessageKind.READ_SCRIPT_ERROR); |
43 await runTest( | 43 await runTest( |
44 Uri.parse('memory:foo.dart'), MessageKind.READ_SCRIPT_ERROR); | 44 Uri.parse('memory:foo.dart'), MessageKind.READ_SCRIPT_ERROR); |
45 await runTest( | 45 await runTest( |
46 Uri.parse('dart:foo'), MessageKind.READ_SCRIPT_ERROR); | 46 Uri.parse('dart:foo'), MessageKind.READ_SCRIPT_ERROR); |
47 }); | 47 }); |
48 } | 48 } |
OLD | NEW |