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; | 5 library frame_test; |
6 | 6 |
7 import 'package:path/path.dart' as path; | 7 import 'package:path/path.dart' as path; |
8 import 'package:stack_trace/stack_trace.dart'; | 8 import 'package:stack_trace/stack_trace.dart'; |
9 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
10 | 10 |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 test('converts "<anonymous closure>" to "<fn>"', () { | 488 test('converts "<anonymous closure>" to "<fn>"', () { |
489 expect(new Frame.parseVM('#0 Foo.<anonymous closure> ' | 489 expect(new Frame.parseVM('#0 Foo.<anonymous closure> ' |
490 '(dart:core/uri.dart:5:10)').toString(), | 490 '(dart:core/uri.dart:5:10)').toString(), |
491 equals('dart:core/uri.dart 5:10 in Foo.<fn>')); | 491 equals('dart:core/uri.dart 5:10 in Foo.<fn>')); |
492 }); | 492 }); |
493 | 493 |
494 test('prints a frame without a column correctly', () { | 494 test('prints a frame without a column correctly', () { |
495 expect(new Frame.parseVM('#0 Foo (dart:core/uri.dart:5)').toString(), | 495 expect(new Frame.parseVM('#0 Foo (dart:core/uri.dart:5)').toString(), |
496 equals('dart:core/uri.dart 5 in Foo')); | 496 equals('dart:core/uri.dart 5 in Foo')); |
497 }); | 497 }); |
| 498 |
| 499 test('prints relative paths as relative', () { |
| 500 var relative = path.normalize('relative/path/to/foo.dart'); |
| 501 expect(new Frame.parseFriendly('$relative 5:10 Foo').toString(), |
| 502 equals('$relative 5:10 in Foo')); |
| 503 }); |
498 }); | 504 }); |
499 } | 505 } |
OLD | NEW |