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

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

Issue 23533074: Support "[as ...]" in V8 stack traces in pkg/stack_trace. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 | « pkg/stack_trace/lib/src/frame.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/stack_trace/test/frame_test.dart
diff --git a/pkg/stack_trace/test/frame_test.dart b/pkg/stack_trace/test/frame_test.dart
index 0be717da0552f8eacf8166b0f5944ff3dcfabd3e..cb52fc30963f24d1c4291b09df903d0bbde5e06a 100644
--- a/pkg/stack_trace/test/frame_test.dart
+++ b/pkg/stack_trace/test/frame_test.dart
@@ -74,6 +74,18 @@ void main() {
expect(frame.member, equals('<fn>'));
});
+ solo_test('parses a stack frame with [as ...] correctly', () {
Jennifer Messerly 2013/09/20 19:14:46 remove solo?
nweiz 2013/09/20 19:29:09 Done.
+ // Ignore "[as ...]", since other stack trace formats don't support a
+ // similar construct.
+ var frame = new Frame.parseV8(" at VW.call\$0 [as call\$4] "
+ "(http://pub.dartlang.org/stuff.dart.js:560:28)");
+ expect(frame.uri,
+ equals(Uri.parse("http://pub.dartlang.org/stuff.dart.js")));
+ expect(frame.line, equals(560));
+ expect(frame.column, equals(28));
+ expect(frame.member, equals('VW.call\$0'));
+ });
+
test('converts "<anonymous>" to "<fn>"', () {
String parsedMember(String member) =>
new Frame.parseV8(' at $member (foo:0:0)').member;
@@ -91,6 +103,9 @@ void main() {
throwsFormatException);
expect(() => new Frame.parseV8(' at Foo (dart:async/future.dart:10)'),
throwsFormatException);
+ expect(() => new Frame.parseV8(' at Foo [as] '
+ '(dart:async/future.dart:10:15)'),
+ throwsFormatException);
expect(() => new Frame.parseV8(' at (dart:async/future.dart:10:15)'),
throwsFormatException);
expect(() => new Frame.parseV8('Foo (dart:async/future.dart:10:15)'),
« no previous file with comments | « pkg/stack_trace/lib/src/frame.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698