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

Unified Diff: lib/src/backend/suite.dart

Issue 1258163002: Split out a RunnerSuite class. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 5 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 | « no previous file | lib/src/runner.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/backend/suite.dart
diff --git a/lib/src/backend/suite.dart b/lib/src/backend/suite.dart
index af1f1ecce4038ed431d98b443e9d705b64bc83e6..4b6fbc941de47c13bebe16f9688af3f2ea2e9478 100644
--- a/lib/src/backend/suite.dart
+++ b/lib/src/backend/suite.dart
@@ -4,11 +4,8 @@
library test.backend.suite;
-import 'dart:async';
import 'dart:collection';
-import '../util/async_thunk.dart';
-import '../utils.dart';
import 'metadata.dart';
import 'operating_system.dart';
import 'test.dart';
@@ -35,12 +32,6 @@ class Suite {
/// The metadata associated with this test suite.
final Metadata metadata;
- /// The thunk for running [close] exactly once.
- final _closeThunk = new AsyncThunk();
-
- /// The function to call when the suite is closed.
- final AsyncFunction _onClose;
-
/// The tests in the test suite.
final List<Test> tests;
@@ -51,11 +42,10 @@ class Suite {
///
/// If [os] is passed without [platform], throws an [ArgumentError].
Suite(Iterable<Test> tests, {this.path, TestPlatform platform,
- OperatingSystem os, Metadata metadata, AsyncFunction onClose})
+ OperatingSystem os, Metadata metadata})
: platform = platform,
os = os,
metadata = _filterMetadata(metadata, platform, os),
- _onClose = onClose,
tests = new UnmodifiableListView<Test>(
_filterTests(tests, platform, os));
@@ -97,13 +87,6 @@ class Suite {
if (metadata == null) metadata = this.metadata;
if (tests == null) tests = this.tests;
return new Suite(tests, platform: platform, os: os, path: path,
- metadata: metadata, onClose: this.close);
- }
-
- /// Closes the suite and releases any resources associated with it.
- Future close() {
- return _closeThunk.run(() async {
- if (_onClose != null) await _onClose();
- });
+ metadata: metadata);
}
}
« no previous file with comments | « no previous file | lib/src/runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698