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; |
} |