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

Unified Diff: pkg/unittest/lib/unittest.dart

Issue 11829045: Cleaning up unittest configurations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
Index: pkg/unittest/lib/unittest.dart
diff --git a/pkg/unittest/lib/unittest.dart b/pkg/unittest/lib/unittest.dart
index c615b123405933b2f2e93e81cbe0a49ec2742182..ea44bea5fe3a323834e325d3b5fb67639abbe000 100644
--- a/pkg/unittest/lib/unittest.dart
+++ b/pkg/unittest/lib/unittest.dart
@@ -822,19 +822,20 @@ _nextBatch() {
/** Publish results on the page and notify controller. */
_completeTests() {
if (!_initialized) return;
- int testsPassed_ = 0;
- int testsFailed_ = 0;
- int testsErrors_ = 0;
+ int passed = 0;
+ int failed = 0;
+ int errors = 0;
for (TestCase t in _tests) {
switch (t.result) {
- case PASS: testsPassed_++; break;
- case FAIL: testsFailed_++; break;
- case ERROR: testsErrors_++; break;
+ case PASS: passed++; break;
+ case FAIL: failed++; break;
+ case ERROR: errors++; break;
}
}
- _config.onDone(testsPassed_, testsFailed_, testsErrors_, _tests,
- _uncaughtErrorMessage);
+ _config.onSummary(passed, failed, errors, _tests, _uncaughtErrorMessage);
+ _config.onDone(passed > 0 && failed == 0 && errors == 0 &&
+ _uncaughtErrorMessage == null);
_initialized = false;
}

Powered by Google App Engine
This is Rietveld 408576698