OLD | NEW |
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; | |
6 | |
7 import 'package:path/path.dart' as path; | 5 import 'package:path/path.dart' as path; |
8 import 'package:stack_trace/stack_trace.dart'; | 6 import 'package:stack_trace/stack_trace.dart'; |
9 import 'package:test/test.dart'; | 7 import 'package:test/test.dart'; |
10 | 8 |
11 void main() { | 9 void main() { |
12 group('.parseVM', () { | 10 group('.parseVM', () { |
13 test('parses a stack frame with column correctly', () { | 11 test('parses a stack frame with column correctly', () { |
14 var frame = new Frame.parseVM("#1 Foo._bar " | 12 var frame = new Frame.parseVM("#1 Foo._bar " |
15 "(file:///home/nweiz/code/stuff.dart:42:21)"); | 13 "(file:///home/nweiz/code/stuff.dart:42:21)"); |
16 expect(frame.uri, | 14 expect(frame.uri, |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 equals('$relative 5:10 in Foo')); | 562 equals('$relative 5:10 in Foo')); |
565 }); | 563 }); |
566 }); | 564 }); |
567 } | 565 } |
568 | 566 |
569 void expectIsUnparsed(Frame constructor(String text), String text) { | 567 void expectIsUnparsed(Frame constructor(String text), String text) { |
570 var frame = constructor(text); | 568 var frame = constructor(text); |
571 expect(frame, new isInstanceOf<UnparsedFrame>()); | 569 expect(frame, new isInstanceOf<UnparsedFrame>()); |
572 expect(frame.toString(), equals(text)); | 570 expect(frame.toString(), equals(text)); |
573 } | 571 } |
OLD | NEW |