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

Unified Diff: test/chain_test.dart

Issue 963893002: Make padding consistent across all stack traces for Chain.toString(). (Closed) Base URL: git@github.com:dart-lang/stack_trace@master
Patch Set: Created 5 years, 10 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 | « pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/chain_test.dart
diff --git a/test/chain_test.dart b/test/chain_test.dart
index cf8a61fa72f9e7643f223ea2cb1590c5c8765fe2..bfe322ce24d3103af54fca47d72114b61fdfc276 100644
--- a/test/chain_test.dart
+++ b/test/chain_test.dart
@@ -479,6 +479,18 @@ void main() {
});
});
+ test("toString() ensures that all traces are aligned", () {
+ var chain = new Chain([
+ new Trace.parse('short 10:11 Foo.bar\n'),
+ new Trace.parse('loooooooooooong 10:11 Zop.zoop')
+ ]);
+
+ expect(chain.toString(), equals(
+ 'short 10:11 Foo.bar\n'
+ '===== asynchronous gap ===========================\n'
+ 'loooooooooooong 10:11 Zop.zoop\n'));
+ });
+
var userSlashCode = p.join('user', 'code.dart');
group('Chain.terse', () {
test('makes each trace terse', () {
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698