Chromium Code Reviews| Index: pkg/unittest/unittest.dart |
| =================================================================== |
| --- pkg/unittest/unittest.dart (revision 11994) |
| +++ pkg/unittest/unittest.dart (working copy) |
| @@ -580,7 +580,8 @@ |
| _testTeardown = null; |
| body(); |
| } catch (e, trace) { |
| - _reportTestError(e.toString(), trace == null ? '' : trace.toString()); |
| + var stack = (trace == null) ? '' : ': ${trace.toString()}'; |
| + _uncaughtErrorMessage = "${e.toString()}$stack"; |
| } finally { |
| // Now that the group is over, restore the previous one. |
| _currentGroup = parentGroup; |
| @@ -662,13 +663,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 19:27:37
this part should probably go away? (seems that you
|
| + 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. */ |