OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 dart2js.analyze_test.test; | 5 library dart2js.analyze_test.test; |
6 | 6 |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 | 8 |
9 import 'package:async_helper/async_helper.dart'; | 9 import 'package:async_helper/async_helper.dart'; |
10 import 'package:compiler/src/apiimpl.dart' show | 10 import 'package:compiler/src/apiimpl.dart' show |
(...skipping 11 matching lines...) Expand all Loading... |
22 * Map of white-listed warnings and errors. | 22 * Map of white-listed warnings and errors. |
23 * | 23 * |
24 * Use an identifiable suffix of the file uri as key. Use a fixed substring of | 24 * Use an identifiable suffix of the file uri as key. Use a fixed substring of |
25 * the error/warning message in the list of white-listings for each file. | 25 * the error/warning message in the list of white-listings for each file. |
26 */ | 26 */ |
27 // TODO(johnniwinther): Support canonical URIs as keys and message kinds as | 27 // TODO(johnniwinther): Support canonical URIs as keys and message kinds as |
28 // values. | 28 // values. |
29 const Map<String, List/*<String|MessageKind>*/> WHITE_LIST = const { | 29 const Map<String, List/*<String|MessageKind>*/> WHITE_LIST = const { |
30 // Several tests import mirrors; any of these might trigger the warning. | 30 // Several tests import mirrors; any of these might trigger the warning. |
31 ".dart": const [ | 31 ".dart": const [ |
32 MessageKind.IMPORT_EXPERIMENTAL_MIRRORS, | |
33 ], | 32 ], |
34 "/test/src/util/": const [ | 33 "/test/src/util/": const [ |
35 "Library 'package:async/async.dart' doesn't export a " | 34 "Library 'package:async/async.dart' doesn't export a " |
36 "'ForkableStream' declaration.", | 35 "'ForkableStream' declaration.", |
37 ], | 36 ], |
38 "mirrors_test.dart": const [ | 37 "mirrors_test.dart": const [ |
39 MessageKind.INVALID_SYMBOL, | 38 MessageKind.INVALID_SYMBOL, |
40 MessageKind.PRIVATE_IDENTIFIER, | 39 MessageKind.PRIVATE_IDENTIFIER, |
41 ], | 40 ], |
42 }; | 41 }; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 if (entity is File && entity.path.endsWith('.dart')) { | 73 if (entity is File && entity.path.endsWith('.dart')) { |
75 Uri file = Uri.base.resolve(nativeToUriPath(entity.path)); | 74 Uri file = Uri.base.resolve(nativeToUriPath(entity.path)); |
76 if (!SKIP_LIST.any((skip) => file.path.contains(skip))) { | 75 if (!SKIP_LIST.any((skip) => file.path.contains(skip))) { |
77 uriList.add(file); | 76 uriList.add(file); |
78 } | 77 } |
79 } | 78 } |
80 } | 79 } |
81 await analyze(uriList, WHITE_LIST, mode: AnalysisMode.URI); | 80 await analyze(uriList, WHITE_LIST, mode: AnalysisMode.URI); |
82 }); | 81 }); |
83 } | 82 } |
OLD | NEW |