| Index: pkg/stack_trace/test/trace_test.dart
|
| diff --git a/pkg/stack_trace/test/trace_test.dart b/pkg/stack_trace/test/trace_test.dart
|
| index ed8fa6b034305d7302b0cfc879075997142735ec..cbbf90bd1f1544239e413337e88862d9c8445c44 100644
|
| --- a/pkg/stack_trace/test/trace_test.dart
|
| +++ b/pkg/stack_trace/test/trace_test.dart
|
| @@ -133,4 +133,23 @@ bar.dart 10:20 alsoNotCore
|
| dart:async bottom
|
| '''));
|
| });
|
| +
|
| + test('.foldFrames folds frames together bottom-up', () {
|
| + var trace = new Trace.parse('''
|
| +#0 notFoo (foo.dart:42:21)
|
| +#1 fooTop (bar.dart:0:2)
|
| +#2 fooBottom (foo.dart:1:100)
|
| +#3 alsoNotFoo (bar.dart:10:20)
|
| +#4 fooTop (dart:io:5:10)
|
| +#5 fooBottom (dart:async-patch:9:11)
|
| +''');
|
| +
|
| + var folded = trace.foldFrames((frame) => frame.member.startsWith('foo'));
|
| + expect(folded.toString(), equals('''
|
| +foo.dart 42:21 notFoo
|
| +foo.dart 1:100 fooBottom
|
| +bar.dart 10:20 alsoNotFoo
|
| +dart:async-patch fooBottom
|
| +'''));
|
| + });
|
| }
|
|
|