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'; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 "main.dart => first.dart => second.dart => dart:mirrors", | 59 "main.dart => first.dart => second.dart => dart:mirrors", |
60 }; | 60 }; |
61 | 61 |
62 const INDIRECT_PACKAGE_IMPORT1 = const { | 62 const INDIRECT_PACKAGE_IMPORT1 = const { |
63 '/main.dart': ''' | 63 '/main.dart': ''' |
64 import 'first.dart'; | 64 import 'first.dart'; |
65 | 65 |
66 main() {} | 66 main() {} |
67 ''', | 67 ''', |
68 '/first.dart': ''' | 68 '/first.dart': ''' |
69 import 'package:second.dart'; | 69 import 'package:second/second.dart'; |
70 ''', | 70 ''', |
71 '/pkg/second.dart': ''' | 71 '/pkg/second/second.dart': ''' |
72 import 'dart:mirrors'; | 72 import 'dart:mirrors'; |
73 ''', | 73 ''', |
74 | 74 |
75 'paths': | 75 'paths': |
76 "first.dart => package:second.dart => dart:mirrors", | 76 "first.dart => package:second => dart:mirrors", |
77 'verbosePaths': | 77 'verbosePaths': |
78 "main.dart => first.dart => package:second.dart => dart:mirrors", | 78 "main.dart => first.dart => package:second/second.dart => dart:mirrors", |
79 }; | 79 }; |
80 | 80 |
81 const INDIRECT_PACKAGE_IMPORT2 = const { | 81 const INDIRECT_PACKAGE_IMPORT2 = const { |
82 '/main.dart': ''' | 82 '/main.dart': ''' |
83 import 'first.dart'; | 83 import 'first.dart'; |
84 | 84 |
85 main() {} | 85 main() {} |
86 ''', | 86 ''', |
87 '/first.dart': ''' | 87 '/first.dart': ''' |
88 import 'package:package-name/second.dart'; | 88 import 'package:package-name/second.dart'; |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 DUAL_INDIRECT_IMPORT3, | 404 DUAL_INDIRECT_IMPORT3, |
405 DUAL_INDIRECT_PACKAGE_IMPORT1, | 405 DUAL_INDIRECT_PACKAGE_IMPORT1, |
406 DIRECT_EXPORT, | 406 DIRECT_EXPORT, |
407 INDIRECT_EXPORT1, | 407 INDIRECT_EXPORT1, |
408 INDIRECT_EXPORT2, | 408 INDIRECT_EXPORT2, |
409 INDIRECT_PACKAGE_EXPORT1, | 409 INDIRECT_PACKAGE_EXPORT1, |
410 INDIRECT_PACKAGE_EXPORT2], | 410 INDIRECT_PACKAGE_EXPORT2], |
411 (map) => checkPaths(map) | 411 (map) => checkPaths(map) |
412 )); | 412 )); |
413 } | 413 } |
OLD | NEW |