| 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 CompilerImpl; | 10 import 'package:compiler/src/apiimpl.dart' show CompilerImpl; |
| 11 import 'package:compiler/src/commandline_options.dart'; | 11 import 'package:compiler/src/commandline_options.dart'; |
| 12 import 'package:compiler/src/diagnostics/messages.dart' show MessageKind; | 12 import 'package:compiler/src/diagnostics/messages.dart' show MessageKind; |
| 13 import 'package:compiler/src/filenames.dart' show nativeToUriPath; | 13 import 'package:compiler/src/filenames.dart' show nativeToUriPath; |
| 14 | 14 |
| 15 import 'analyze_helper.dart'; | 15 import 'analyze_helper.dart'; |
| 16 import 'memory_compiler.dart'; | 16 import 'memory_compiler.dart'; |
| 17 | 17 |
| 18 /** | 18 /** |
| 19 * Map of white-listed warnings and errors. | 19 * Map of white-listed warnings and errors. |
| 20 * | 20 * |
| 21 * Use an identifiable suffix of the file uri as key. Use a fixed substring of | 21 * Use an identifiable suffix of the file uri as key. Use a fixed substring of |
| 22 * the error/warning message in the list of white-listings for each file. | 22 * the error/warning message in the list of white-listings for each file. |
| 23 */ | 23 */ |
| 24 // TODO(johnniwinther): Support canonical URIs as keys. | 24 // TODO(johnniwinther): Support canonical URIs as keys. |
| 25 const Map<String, List/*<String|MessageKind>*/ > WHITE_LIST = const { | 25 const Map<String, List/*<String|MessageKind>*/ > WHITE_LIST = const { |
| 26 "/test/lib/src/util/": const [ | 26 "/test/lib/src/util/": const [ |
| 27 "Library 'package:async/async.dart' doesn't export a " | 27 "Library 'package:async/async.dart' doesn't export a " |
| 28 "'ForkableStream' declaration.", | 28 "'ForkableStream' declaration.", |
| 29 ], | 29 ], |
| 30 "pkg/kernel/lib/transformations/closure/": const [ |
| 31 "Duplicated library name 'kernel.transformations.closure.converter'", |
| 32 ], |
| 30 }; | 33 }; |
| 31 | 34 |
| 32 const List<String> SKIP_LIST = const <String>[ | 35 const List<String> SKIP_LIST = const <String>[ |
| 33 // Helper files: | 36 // Helper files: |
| 34 "/data/", | 37 "/data/", |
| 35 "quarantined/http_launch_data/", | 38 "quarantined/http_launch_data/", |
| 36 "mirrors_helper.dart", | 39 "mirrors_helper.dart", |
| 37 "path%20with%20spaces/", | 40 "path%20with%20spaces/", |
| 38 // Broken tests: | 41 // Broken tests: |
| 39 "quarantined/http_test.dart", | 42 "quarantined/http_test.dart", |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } | 95 } |
| 93 | 96 |
| 94 asyncTest(() async { | 97 asyncTest(() async { |
| 95 if (uriList.isEmpty) { | 98 if (uriList.isEmpty) { |
| 96 uriList = computeInputUris(filter: filter); | 99 uriList = computeInputUris(filter: filter); |
| 97 } | 100 } |
| 98 await analyze(uriList, WHITE_LIST, | 101 await analyze(uriList, WHITE_LIST, |
| 99 mode: AnalysisMode.URI, options: options); | 102 mode: AnalysisMode.URI, options: options); |
| 100 }); | 103 }); |
| 101 } | 104 } |
| OLD | NEW |