Chromium Code Reviews| Index: pkg/unittest/lib/src/test_case.dart |
| diff --git a/pkg/unittest/lib/src/test_case.dart b/pkg/unittest/lib/src/test_case.dart |
| index 03eafd290d6211b421dccba4135c292c7e08559f..cde0eeed9e51abed6a1759ce13d4f6e1775989d9 100644 |
| --- a/pkg/unittest/lib/src/test_case.dart |
| +++ b/pkg/unittest/lib/src/test_case.dart |
| @@ -99,7 +99,11 @@ class TestCase { |
| _startTime = new DateTime.now(); |
| _runningTime = null; |
| ++_callbackFunctionsOutstanding; |
| - return _testFunction(); |
| + var testReturn = _testFunction(); |
| + if (testReturn is Future) { |
| + ++_callbackFunctionsOutstanding; |
| + testReturn.catchError(_errorHandler('Test')).whenComplete(_markCallbackComplete); |
|
kevmoo
2014/07/29 19:59:01
long line
Also, would you add a note explaining t
Paul Berry
2014/07/29 21:54:38
Done.
|
| + } |
| }).catchError(_errorHandler('Test')).then((_) { |
| _markCallbackComplete(); |
| if (result == null) { |