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

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

Issue 2099503002: Add a dedicated Result for skipped tests. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 4 years, 6 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/frontend/expect_async.dart ('k') | lib/src/runner/live_suite_controller.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/engine.dart
diff --git a/lib/src/runner/engine.dart b/lib/src/runner/engine.dart
index ba17aced58f963cd909af5d84ac16c8aa7da3089..e422681c57602fa19a17057e318a78e9b775c3bf 100644
--- a/lib/src/runner/engine.dart
+++ b/lib/src/runner/engine.dart
@@ -73,7 +73,7 @@ class Engine {
/// previous suites to be unloaded in the order they completed.
final Pool _loadPool;
- /// Whether all tests passed.
+ /// Whether all tests passed or were skipped.
///
/// This fires once all tests have completed and [suiteSink] has been closed.
/// This will be `null` if [close] was called before all the tests finished
@@ -81,8 +81,7 @@ class Engine {
Future<bool> get success async {
await _group.future;
if (_closedBeforeDone) return null;
- return liveTests.every((liveTest) =>
- liveTest.state.result == Result.success);
+ return liveTests.every((liveTest) => liveTest.state.result.isPassing);
}
/// A group of futures for each test suite.
@@ -286,7 +285,7 @@ class Engine {
var liveTest = group.setUpAll.load(suiteController.liveSuite.suite,
groups: parents);
await _runLiveTest(suiteController, liveTest, countSuccess: false);
- setUpAllSucceeded = liveTest.state.result == Result.success;
+ setUpAllSucceeded = liveTest.state.result.isPassing;
}
if (!_closed && setUpAllSucceeded) {
@@ -372,7 +371,8 @@ class Engine {
controller = new LiveTestController(
suiteController.liveSuite.suite, test, () {
controller.setState(const State(Status.running, Result.success));
- controller.setState(const State(Status.complete, Result.success));
+ controller.setState(const State(Status.running, Result.skipped));
+ controller.setState(const State(Status.complete, Result.skipped));
controller.completer.complete();
}, () {}, groups: parents);
« no previous file with comments | « lib/src/frontend/expect_async.dart ('k') | lib/src/runner/live_suite_controller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698