OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 emits a warning on import of 'dart:mirrors' unless | 5 // Test that the compiler emits a warning on import of 'dart:mirrors' unless |
6 // the flag --enable-experimental-mirrors is used. | 6 // the flag --enable-experimental-mirrors is used. |
7 | 7 |
8 library dart2js.test.import; | 8 library dart2js.test.import; |
9 | 9 |
10 import 'dart:async'; | 10 import 'dart:async'; |
11 import 'package:expect/expect.dart'; | 11 import 'package:expect/expect.dart'; |
12 import 'package:async_helper/async_helper.dart'; | 12 import 'package:async_helper/async_helper.dart'; |
13 import 'package:compiler/src/messages.dart' show MessageKind, MessageTemplate; | 13 import 'package:compiler/src/diagnostics/messages.dart' show |
| 14 MessageKind, |
| 15 MessageTemplate; |
14 import 'memory_compiler.dart'; | 16 import 'memory_compiler.dart'; |
15 | 17 |
16 const DIRECT_IMPORT = const { | 18 const DIRECT_IMPORT = const { |
17 '/main.dart': ''' | 19 '/main.dart': ''' |
18 import 'dart:mirrors'; | 20 import 'dart:mirrors'; |
19 | 21 |
20 main() {} | 22 main() {} |
21 ''', | 23 ''', |
22 | 24 |
23 'paths': | 25 'paths': |
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 DUAL_INDIRECT_IMPORT3, | 408 DUAL_INDIRECT_IMPORT3, |
407 DUAL_INDIRECT_PACKAGE_IMPORT1, | 409 DUAL_INDIRECT_PACKAGE_IMPORT1, |
408 DIRECT_EXPORT, | 410 DIRECT_EXPORT, |
409 INDIRECT_EXPORT1, | 411 INDIRECT_EXPORT1, |
410 INDIRECT_EXPORT2, | 412 INDIRECT_EXPORT2, |
411 INDIRECT_PACKAGE_EXPORT1, | 413 INDIRECT_PACKAGE_EXPORT1, |
412 INDIRECT_PACKAGE_EXPORT2], | 414 INDIRECT_PACKAGE_EXPORT2], |
413 (map) => checkPaths(map) | 415 (map) => checkPaths(map) |
414 )); | 416 )); |
415 } | 417 } |
OLD | NEW |