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

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

Issue 14753005: Enable parsing of IPv6 form addresse (see rfc2373 and rfc2732). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix tets. Created 7 years, 7 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/lib/src/frame.dart ('k') | pkg/stack_trace/test/trace_test.dart » ('j') | 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 frame_test; 5 library frame_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 13 matching lines...) Expand all
24 if (level == null) return new Frame.caller(); 24 if (level == null) return new Frame.caller();
25 return new Frame.caller(level); 25 return new Frame.caller(level);
26 } 26 }
27 27
28 Frame nestedGetCaller(int level) => getCaller(level); 28 Frame nestedGetCaller(int level) => getCaller(level);
29 29
30 void main() { 30 void main() {
31 test('parses a stack frame correctly', () { 31 test('parses a stack frame correctly', () {
32 var frame = new Frame.parse("#1 Foo._bar " 32 var frame = new Frame.parse("#1 Foo._bar "
33 "(file:///home/nweiz/code/stuff.dart:42:21)"); 33 "(file:///home/nweiz/code/stuff.dart:42:21)");
34 expect(frame.uri, 34 expect(frame.uri, equals(Uri.parse("file:///home/nweiz/code/stuff.dart")));
35 equals(new Uri.fromString("file:///home/nweiz/code/stuff.dart")));
36 expect(frame.line, equals(42)); 35 expect(frame.line, equals(42));
37 expect(frame.column, equals(21)); 36 expect(frame.column, equals(21));
38 expect(frame.member, equals('Foo._bar')); 37 expect(frame.member, equals('Foo._bar'));
39 }); 38 });
40 39
41 test('parses a real stack frame correctly', () { 40 test('parses a real stack frame correctly', () {
42 var frame = new Frame.parse(getStackFrame()); 41 var frame = new Frame.parse(getStackFrame());
43 // TODO(nweiz): use URL-style paths when such a thing exists. 42 // TODO(nweiz): use URL-style paths when such a thing exists.
44 var builder = new path.Builder(style: path.Style.posix); 43 var builder = new path.Builder(style: path.Style.posix);
45 expect(builder.basename(frame.uri.path), equals('frame_test.dart')); 44 expect(builder.basename(frame.uri.path), equals('frame_test.dart'));
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 equals('dart:core in Foo')); 167 equals('dart:core in Foo'));
169 }); 168 });
170 169
171 test('converts "<anonymous closure>" to "<fn>"', () { 170 test('converts "<anonymous closure>" to "<fn>"', () {
172 expect(new Frame.parse('#0 Foo.<anonymous closure> (dart:core:5:10)') 171 expect(new Frame.parse('#0 Foo.<anonymous closure> (dart:core:5:10)')
173 .toString(), 172 .toString(),
174 equals('dart:core in Foo.<fn>')); 173 equals('dart:core in Foo.<fn>'));
175 }); 174 });
176 }); 175 });
177 } 176 }
OLDNEW
« no previous file with comments | « pkg/stack_trace/lib/src/frame.dart ('k') | pkg/stack_trace/test/trace_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698