Chromium Code Reviews| Index: client/testing/unittest/shared.dart |
| =================================================================== |
| --- client/testing/unittest/shared.dart (revision 1630) |
| +++ client/testing/unittest/shared.dart (working copy) |
| @@ -159,9 +159,6 @@ |
| /** Runs a single test. */ |
| _runTest(TestCase testCase) { |
| try { |
| - // TODO(sigmund): remove this declaration once dartc supports trapping error |
| - // traces. |
| - var trace = ''; |
| _callbacksCalled = 0; |
| _state = _RUNNING_TEST; |
| @@ -175,11 +172,13 @@ |
| } catch (ExpectException e, var trace) { |
| if (_state != _UNCAUGHT_ERROR) { |
| - testCase.fail(e.message, trace.toString()); |
| + //TODO remove guard once dartc reliably propagates traces |
|
Siggi Cherem (dart-lang)
2011/11/17 22:03:59
TODO -> TODO(pquitslund) or TODO(sigmund)
|
| + testCase.fail(e.message, trace == null ? '' : trace.toString()); |
| } |
| } catch (var e, var trace) { |
| if (_state != _UNCAUGHT_ERROR) { |
| - testCase.error('Caught ${e}', trace.toString()); |
| + //TODO remove guard once dartc reliably propagates traces |
| + testCase.error('Caught ${e}', trace == null ? '' : trace.toString()); |
| } |
| } finally { |
| _state = _READY; |