Chromium Code Reviews| Index: pkg/unittest/lib/src/config.dart |
| =================================================================== |
| --- pkg/unittest/lib/src/config.dart (revision 26205) |
| +++ pkg/unittest/lib/src/config.dart (working copy) |
| @@ -55,7 +55,7 @@ |
| // If stopTestOnExpectFailure is false, we need to capture failures, which |
| // we do with this List. |
| - final _testLogBuffer = <Pair<String, Trace>>[]; |
| + final _testLogBuffer = <Pair<String, String>>[]; |
|
nweiz
2013/08/15 23:03:25
Trace implements StackTrace, so you can make this
gram
2013/08/16 16:56:45
Done.
gram
2013/08/16 16:56:45
Done.
|
| /** |
| * The constructor sets up a failure handler for [expect] that redirects |
| @@ -72,6 +72,7 @@ |
| * asynchronously and that the process should wait until they are done. |
| */ |
| void onInit() { |
| + formatStacks = false; |
| _receivePort = new ReceivePort(); |
| _postMessage('unittest-suite-wait-for-done'); |
| } |
| @@ -154,8 +155,9 @@ |
| try { |
| throw ''; |
| } catch (_, stack) { |
| - _testLogBuffer.add( |
| - new Pair<String, Trace>(reason, new Trace.from(stack))); |
| + var trace = _getTrace(stack); |
| + if (trace == null) trace = stack; |
| + _testLogBuffer.add(new Pair<String, String>(reason, trace.toString())); |
|
nweiz
2013/08/15 23:03:25
Why are you eagerly converting the stack trace to
gram
2013/08/16 16:56:45
Because I didn't realize Trace <- StackTrace. :-)
|
| } |
| } |
| } |