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 library analyze_unused_dart2js; | 5 library analyze_unused_dart2js; |
6 | 6 |
7 import 'package:async_helper/async_helper.dart'; | 7 import 'package:async_helper/async_helper.dart'; |
8 | 8 |
9 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart'; | 9 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart'; |
10 | 10 |
11 import 'analyze_helper.dart'; | 11 import 'analyze_helper.dart'; |
12 | 12 |
13 const String SIMPLIFY_NEVER_CALLED = "The method 'simplify' is never called"; | 13 const String SIMPLIFY_NEVER_CALLED = "The method 'simplify' is never called"; |
14 | 14 |
15 // The simplify method isn't used in dart2js anymore but is used by many tests. | |
16 const Map<String, List<String>> WHITE_LIST = const { | |
17 "type_mask.dart": const [SIMPLIFY_NEVER_CALLED], | |
18 "concrete_types_inferrer.dart": const [SIMPLIFY_NEVER_CALLED], | |
19 }; | |
20 | |
21 void main() { | 15 void main() { |
22 var uri = currentDirectory.resolve( | 16 var uri = currentDirectory.resolve( |
23 'sdk/lib/_internal/compiler/implementation/use_unused_api.dart'); | 17 'sdk/lib/_internal/compiler/implementation/use_unused_api.dart'); |
24 asyncTest( | 18 asyncTest(() => analyze([uri], {}, analyzeAll: false)); |
25 () => analyze([uri], WHITE_LIST, analyzeAll: false)); | |
26 } | 19 } |
OLD | NEW |