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

Unified Diff: lib/unittest/config.dart

Issue 10382094: Refactor the pub tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « no previous file | lib/unittest/unittest.dart » ('j') | lib/unittest/unittest.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/unittest/config.dart
diff --git a/lib/unittest/config.dart b/lib/unittest/config.dart
index c0a2f78daddb6cc67c700d16e4233caa3121c5e7..19560de956054ed58d40b81d0e95a26b9a8998c5 100644
--- a/lib/unittest/config.dart
+++ b/lib/unittest/config.dart
@@ -46,7 +46,11 @@ class Configuration {
print('${t.result.toUpperCase()}: ${t.description}');
if (t.message != '') {
- print(' ${t.message}');
+ print(_indent(t.message));
+ }
+
+ if (t.stackTrace != null && t.stackTrace != '') {
+ print(_indent(t.stackTrace));
}
}
@@ -71,4 +75,11 @@ class Configuration {
// An exception is used by the test infrastructure to detect failure.
if (!success) throw new Exception("Some tests failed.");
}
+
+ String _indent(String str) {
+ // TODO(nweiz): Use this simpler code once issue 2980 is fixed.
+ // return str.replaceAll(const RegExp("^", multiLine: true), " ");
+
+ return Strings.join(str.split("\n").map((line) => " $line"), "\n");
+ }
}
« no previous file with comments | « no previous file | lib/unittest/unittest.dart » ('j') | lib/unittest/unittest.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698