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

Unified Diff: test/trace_test.dart

Issue 921553006: Fold empty async frames when generating a terse stack trace. (Closed) Base URL: git@github.com:dart-lang/stack_trace@master
Patch Set: Code review changes 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/trace_test.dart
diff --git a/test/trace_test.dart b/test/trace_test.dart
index 17f9c22e946d539afaf80d7158655ce22df1f292..c8a848bd361d66c1dd762f4f62d69bb64fdf8dcc 100644
--- a/test/trace_test.dart
+++ b/test/trace_test.dart
@@ -283,6 +283,20 @@ dart:async bottom
'''));
});
+ test('.terse folds empty async frames', () {
+ var trace = new Trace.parse('''
+#0 notCore (foo.dart:42:21)
+#1 top (dart:async/future.dart:0:2)
+#2 empty.<<anonymous closure>_async_body> (bar.dart)
+#3 bottom (dart:async-patch/future.dart:9:11)
+''');
+
+ expect(trace.terse.toString(), equals('''
+foo.dart 42:21 notCore
+dart:async bottom
+'''));
+ });
+
test('.foldFrames folds frames together bottom-up', () {
var trace = new Trace.parse('''
#0 notFoo (foo.dart:42:21)
« 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