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

Side by Side Diff: pkg/stack_trace/test/trace_test.dart

Issue 13157004: Use the stack_trace library in scheduled_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/stack_trace/test/frame_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library trace_test; 5 library trace_test;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 import 'dart:uri'; 8 import 'dart:uri';
9 9
10 import 'package:pathos/path.dart' as path; 10 import 'package:pathos/path.dart' as path;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 #5 bottom (dart:async-patch:9:11) 126 #5 bottom (dart:async-patch:9:11)
127 '''); 127 ''');
128 128
129 expect(trace.terse.toString(), equals(''' 129 expect(trace.terse.toString(), equals('''
130 foo.dart 42:21 notCore 130 foo.dart 42:21 notCore
131 dart:core bottom 131 dart:core bottom
132 bar.dart 10:20 alsoNotCore 132 bar.dart 10:20 alsoNotCore
133 dart:async bottom 133 dart:async bottom
134 ''')); 134 '''));
135 }); 135 });
136
137 test('.foldFrames folds frames together bottom-up', () {
138 var trace = new Trace.parse('''
139 #0 notFoo (foo.dart:42:21)
140 #1 fooTop (bar.dart:0:2)
141 #2 fooBottom (foo.dart:1:100)
142 #3 alsoNotFoo (bar.dart:10:20)
143 #4 fooTop (dart:io:5:10)
144 #5 fooBottom (dart:async-patch:9:11)
145 ''');
146
147 var folded = trace.foldFrames((frame) => frame.member.startsWith('foo'));
148 expect(folded.toString(), equals('''
149 foo.dart 42:21 notFoo
150 foo.dart 1:100 fooBottom
151 bar.dart 10:20 alsoNotFoo
152 dart:async-patch fooBottom
153 '''));
154 });
136 } 155 }
OLDNEW
« no previous file with comments | « pkg/stack_trace/test/frame_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698