Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(599)

Unified Diff: lib/src/runner/reporter/expanded.dart

Issue 1124113002: Add a flag controlling how verbose stack traces are. (Closed) Base URL: git@github.com:dart-lang/test.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/runner/reporter/compact.dart ('k') | lib/src/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/reporter/expanded.dart
diff --git a/lib/src/runner/reporter/expanded.dart b/lib/src/runner/reporter/expanded.dart
index 70a4874f50e8aed0d40603f3d2bcd8415db5a03e..39f0e3486348ae869f1d747ec70cc47a33fdd925 100644
--- a/lib/src/runner/reporter/expanded.dart
+++ b/lib/src/runner/reporter/expanded.dart
@@ -40,6 +40,9 @@ class ExpandedReporter {
/// this is Windows or not outputting to a terminal.
final String _noColor;
+ /// Whether to use verbose stack traces.
+ final bool _verboseTrace;
+
/// The engine used to run the tests.
final Engine _engine;
@@ -79,12 +82,15 @@ class ExpandedReporter {
/// Creates a [NoIoCompactReporter] that will run all tests in [suites].
///
/// [concurrency] controls how many suites are run at once. If [color] is
- /// `true`, this will use terminal colors; if it's `false`, it won't.
- ExpandedReporter(Iterable<Suite> suites, {int concurrency, bool color: true})
+ /// `true`, this will use terminal colors; if it's `false`, it won't. If
+ /// [verboseTrace] is `true`, this will print core library frames.
+ ExpandedReporter(Iterable<Suite> suites, {int concurrency, bool color: true,
+ bool verboseTrace: false})
: _multiplePaths = suites.map((suite) => suite.path).toSet().length > 1,
_multiplePlatforms =
suites.map((suite) => suite.platform).toSet().length > 1,
_engine = new Engine(suites, concurrency: concurrency),
+ _verboseTrace = verboseTrace,
_green = color ? '\u001b[32m' : '',
_red = color ? '\u001b[31m' : '',
_yellow = color ? '\u001b[33m' : '',
@@ -123,7 +129,8 @@ class ExpandedReporter {
_progressLine(_description(liveTest));
print(indent(error.error.toString()));
- print(indent(terseChain(error.stackTrace).toString()));
+ var chain = terseChain(error.stackTrace, verbose: _verboseTrace);
+ print(indent(chain.toString()));
});
liveTest.onPrint.listen((line) {
« no previous file with comments | « lib/src/runner/reporter/compact.dart ('k') | lib/src/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698