Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Unified Diff: tests/compiler/dart2js/analyze_test_test.dart

Issue 2294753002: Handle parts as input in resolver. (Closed)
Patch Set: Updated cf. comments. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/dart2js_resolver.dart ('k') | tests/compiler/dart2js/dart2js_resolver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/analyze_test_test.dart
diff --git a/tests/compiler/dart2js/analyze_test_test.dart b/tests/compiler/dart2js/analyze_test_test.dart
index 43d490dd09e263ff4ca3ce1ad1fecb666dc7f2da..ebf8622280151472ec972b7f94d7133ab8066ab0 100644
--- a/tests/compiler/dart2js/analyze_test_test.dart
+++ b/tests/compiler/dart2js/analyze_test_test.dart
@@ -44,6 +44,24 @@ const List<String> SKIP_LIST = const <String>[
"packages/",
];
+List<Uri> computeInputUris({String filter}) {
+ List<Uri> uriList = <Uri>[];
+ Directory dir =
+ new Directory.fromUri(Uri.base.resolve('tests/compiler/dart2js/'));
+ for (FileSystemEntity entity in dir.listSync(recursive: true)) {
+ if (entity is File && entity.path.endsWith('.dart')) {
+ Uri file = Uri.base.resolve(nativeToUriPath(entity.path));
+ if (filter != null && !'$file'.contains(filter)) {
+ continue;
+ }
+ if (!SKIP_LIST.any((skip) => file.path.contains(skip))) {
+ uriList.add(file);
+ }
+ }
+ }
+ return uriList;
+}
+
main(List<String> arguments) {
List<String> options = <String>[];
List<Uri> uriList = <Uri>[];
@@ -78,19 +96,7 @@ main(List<String> arguments) {
asyncTest(() async {
if (uriList.isEmpty) {
- Directory dir =
- new Directory.fromUri(Uri.base.resolve('tests/compiler/dart2js/'));
- for (FileSystemEntity entity in dir.listSync(recursive: true)) {
- if (entity is File && entity.path.endsWith('.dart')) {
- Uri file = Uri.base.resolve(nativeToUriPath(entity.path));
- if (filter != null && !'$file'.contains(filter)) {
- continue;
- }
- if (!SKIP_LIST.any((skip) => file.path.contains(skip))) {
- uriList.add(file);
- }
- }
- }
+ uriList = computeInputUris(filter: filter);
}
await analyze(
uriList,
« no previous file with comments | « pkg/compiler/lib/src/dart2js_resolver.dart ('k') | tests/compiler/dart2js/dart2js_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698