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

Unified Diff: test/trace_test.dart

Issue 967633002: Remove the line number and file information from *all* folded frames. (Closed) Base URL: git@github.com:dart-lang/stack_trace@master
Patch Set: Fix a README thing. 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 | « test/chain_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/trace_test.dart
diff --git a/test/trace_test.dart b/test/trace_test.dart
index 10c931c8bbdf973c3bb70e330a28a272822a3929..18875096a7192a6d824c684f0a8645e22d517476 100644
--- a/test/trace_test.dart
+++ b/test/trace_test.dart
@@ -359,4 +359,24 @@ dart:async coreBottom
bar.dart 10:20 alsoNotFoo
'''));
});
+
+ test('.foldFrames with terse: true shortens folded frames', () {
+ var trace = new Trace.parse('''
+#0 notFoo (foo.dart:42:21)
+#1 fooTop (bar.dart:0:2)
+#2 fooBottom (package:foo/bar.dart:0:2)
+#3 alsoNotFoo (bar.dart:10:20)
+#4 fooTop (foo.dart:9:11)
+#5 fooBottom (foo/bar.dart:9:11)
+''');
+
+ var folded = trace.foldFrames((frame) => frame.member.startsWith('foo'),
+ terse: true);
+ expect(folded.toString(), equals('''
+foo.dart 42:21 notFoo
+package:foo fooBottom
+bar.dart 10:20 alsoNotFoo
+foo fooBottom
+'''));
+ });
}
« no previous file with comments | « test/chain_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698