| Index: pkg/unittest/lib/unittest.dart
|
| ===================================================================
|
| --- pkg/unittest/lib/unittest.dart (revision 24041)
|
| +++ pkg/unittest/lib/unittest.dart (working copy)
|
| @@ -863,6 +863,12 @@
|
| /** Signature for a test function. */
|
| typedef dynamic TestFunction();
|
|
|
| +/**
|
| + * A flag that controls whether we hide unittest details in exception stacks.
|
| + * Useful to disable when debugging unittest or matcher customizations.
|
| + */
|
| +bool formatStacks = true;
|
| +
|
| // Stack formatting utility. Strips extraneous content from a stack trace.
|
| // Stack frame lines are parsed with a regexp, which has been tested
|
| // in Chrome, Firefox and the VM. If a line fails to be parsed it is
|
| @@ -886,6 +892,7 @@
|
| r'):([:\d]+)[\)]?$'); // Get the line number and optional column number.
|
|
|
| String _formatStack(stack) {
|
| + if (!formatStacks) return "$stack";
|
| var lines;
|
| if (stack is StackTrace) {
|
| lines = stack.toString().split('\n');
|
|
|