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

Unified Diff: pkg/stack_trace/test/trace_test.dart

Issue 75863004: Add a stack chain class to the stack trace package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 7 years, 1 month 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 | « pkg/stack_trace/test/chain_test.dart ('k') | pkg/stack_trace/test/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ad916f156d8d04c32d0133f4cadd10dae073eaac..4c3278f376e10bae39c419891e35884d0d56fbf4 100644
--- a/pkg/stack_trace/test/trace_test.dart
+++ b/pkg/stack_trace/test/trace_test.dart
@@ -171,6 +171,24 @@ void main() {
equals(Uri.parse("http://dartlang.org/foo/baz.dart")));
});
+ test('parses a package:stack_trace stack chain correctly', () {
+ var trace = new Trace.parse(
+ 'http://dartlang.org/foo/bar.dart 10:11 Foo.<fn>.bar\n'
+ 'http://dartlang.org/foo/baz.dart Foo.<fn>.bar\n'
+ '===== asynchronous gap ===========================\n'
+ 'http://dartlang.org/foo/bang.dart 10:11 Foo.<fn>.bar\n'
+ 'http://dartlang.org/foo/quux.dart Foo.<fn>.bar');
+
+ expect(trace.frames[0].uri,
+ equals(Uri.parse("http://dartlang.org/foo/bar.dart")));
+ expect(trace.frames[1].uri,
+ equals(Uri.parse("http://dartlang.org/foo/baz.dart")));
+ expect(trace.frames[2].uri,
+ equals(Uri.parse("http://dartlang.org/foo/bang.dart")));
+ expect(trace.frames[3].uri,
+ equals(Uri.parse("http://dartlang.org/foo/quux.dart")));
+ });
+
test('parses a real package:stack_trace stack trace correctly', () {
var traceString = new Trace.current().toString();
expect(new Trace.parse(traceString).toString(), equals(traceString));
« no previous file with comments | « pkg/stack_trace/test/chain_test.dart ('k') | pkg/stack_trace/test/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698