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

Unified Diff: lib/src/runner/runner_suite.dart

Issue 1390883002: Make Suite contain a single Group. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 2 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 | « lib/src/runner/loader.dart ('k') | lib/src/runner/vm/isolate_listener.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/runner_suite.dart
diff --git a/lib/src/runner/runner_suite.dart b/lib/src/runner/runner_suite.dart
index 69cc373177893f1fc43aea912286936c2b4b8bd0..e53bf1f51c5f86ca05dc59a448773262ae57d615 100644
--- a/lib/src/runner/runner_suite.dart
+++ b/lib/src/runner/runner_suite.dart
@@ -8,10 +8,9 @@ import 'dart:async';
import 'package:async/async.dart';
-import '../backend/metadata.dart';
import '../backend/operating_system.dart';
import '../backend/suite.dart';
-import '../backend/suite_entry.dart';
+import '../backend/group.dart';
import '../backend/test.dart';
import '../backend/test_platform.dart';
import '../utils.dart';
@@ -32,20 +31,16 @@ class RunnerSuite extends Suite {
/// The function to call when the suite is closed.
final AsyncFunction _onClose;
- RunnerSuite(this.environment, Iterable<SuiteEntry> entries, {String path,
- TestPlatform platform, OperatingSystem os, Metadata metadata,
- AsyncFunction onClose})
- : super(entries,
- path: path, platform: platform, os: os, metadata: metadata),
+ RunnerSuite(this.environment, Group group, {String path,
+ TestPlatform platform, OperatingSystem os, AsyncFunction onClose})
+ : super(group, path: path, platform: platform, os: os),
_onClose = onClose;
RunnerSuite filter(bool callback(Test test)) {
- var filtered = entries
- .map((entry) => entry.filter(callback))
- .where((entry) => entry != null)
- .toList();
+ var filtered = group.filter(callback);
+ filtered ??= new Group.root([], metadata: metadata);
return new RunnerSuite(environment, filtered,
- platform: platform, os: os, path: path, metadata: metadata);
+ platform: platform, os: os, path: path);
}
/// Closes the suite and releases any resources associated with it.
« no previous file with comments | « lib/src/runner/loader.dart ('k') | lib/src/runner/vm/isolate_listener.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698