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

Unified Diff: pkg/unittest/unittest.dart

Issue 10909123: Fix issue 2933 - if an exception is thrown before we start the first test, but after the testcase i… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 | « pkg/unittest/test_case.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/unittest.dart
===================================================================
--- pkg/unittest/unittest.dart (revision 11994)
+++ pkg/unittest/unittest.dart (working copy)
@@ -662,13 +662,15 @@
void _reportTestError(String msg, String trace) {
if (_currentTest < _tests.length) {
final testCase = _tests[_currentTest];
- testCase.error(msg, trace);
- if (testCase.callbackFunctionsOutstanding > 0) {
- _nextTestCase();
+ if (testCase.running) {
Siggi Cherem (dart-lang) 2012/09/07 17:13:23 seems that this means that also tests that fail af
gram 2012/09/07 17:40:53 I thought about that. I have mixed feelings about
+ testCase.error(msg, trace);
+ if (testCase.callbackFunctionsOutstanding > 0) {
+ _nextTestCase();
+ }
+ return;
}
- } else {
- _uncaughtErrorMessage = "$msg: $trace";
}
+ _uncaughtErrorMessage = "$msg: $trace";
}
/** Runs [callback] at the end of the event loop. */
« no previous file with comments | « pkg/unittest/test_case.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698