Chromium Code Reviews| Index: pkg/unittest/lib/src/test_case.dart |
| =================================================================== |
| --- pkg/unittest/lib/src/test_case.dart (revision 26205) |
| +++ pkg/unittest/lib/src/test_case.dart (working copy) |
| @@ -41,9 +41,9 @@ |
| */ |
| String get result => _result; |
| - Trace _stackTrace; |
| + String _stackTrace; |
| /** Stack trace associated with this test, or [null] if it succeeded. */ |
| - Trace get stackTrace => _stackTrace; |
| + get stackTrace => _stackTrace; |
|
nweiz
2013/08/15 23:03:25
The getter should also be typed.
Now there's no w
gram
2013/08/16 16:56:45
I'm changing it to StackTrace; I wasn't aware that
|
| /** The group (or groups) under which this test is running. */ |
| final String currentGroup; |
| @@ -132,7 +132,9 @@ |
| // is the first time the result is being set. |
| void _setResult(String testResult, String messageText, stack) { |
|
nweiz
2013/08/15 23:03:25
[stack] here should be typed as StackTrace.
gram
2013/08/16 16:56:45
Done.
|
| _message = messageText; |
| - _stackTrace = _getTrace(stack); |
| + var trace = _getTrace(stack); |
| + if (trace == null) trace = stack; |
| + _stackTrace = (trace == null) ? null : trace.toString(); |
| if (result == null) { |
| _result = testResult; |
| _config.onTestResult(this); |