| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 expect(parsedMember('<anonymous closure>.<anonymous closure>.bar'), | 49 expect(parsedMember('<anonymous closure>.<anonymous closure>.bar'), |
| 50 equals('<fn>.<fn>.bar')); | 50 equals('<fn>.<fn>.bar')); |
| 51 }); | 51 }); |
| 52 | 52 |
| 53 test('converts "<<anonymous closure>_async_body>" to "<async>"', () { | 53 test('converts "<<anonymous closure>_async_body>" to "<async>"', () { |
| 54 var frame = new Frame.parseVM( | 54 var frame = new Frame.parseVM( |
| 55 '#0 Foo.<<anonymous closure>_async_body> (foo:0:0)'); | 55 '#0 Foo.<<anonymous closure>_async_body> (foo:0:0)'); |
| 56 expect(frame.member, equals('Foo.<async>')); | 56 expect(frame.member, equals('Foo.<async>')); |
| 57 }); | 57 }); |
| 58 | 58 |
| 59 test('converts "<<anonymous closure>_async_body>" to "<async>"', () { | 59 test('converts "<function_name_async_body>" to "<async>"', () { |
| 60 var frame = new Frame.parseVM( | 60 var frame = new Frame.parseVM( |
| 61 '#0 Foo.<<anonymous closure>_async_body> (foo:0:0)'); | 61 '#0 Foo.<function_name_async_body> (foo:0:0)'); |
| 62 expect(frame.member, equals('Foo.<async>')); | 62 expect(frame.member, equals('Foo.<async>')); |
| 63 }); | 63 }); |
| 64 | 64 |
| 65 test('parses a folded frame correctly', () { | 65 test('parses a folded frame correctly', () { |
| 66 var frame = new Frame.parseVM('...'); | 66 var frame = new Frame.parseVM('...'); |
| 67 | 67 |
| 68 expect(frame.member, equals('...')); | 68 expect(frame.member, equals('...')); |
| 69 expect(frame.uri, equals(new Uri())); | 69 expect(frame.uri, equals(new Uri())); |
| 70 expect(frame.line, isNull); | 70 expect(frame.line, isNull); |
| 71 expect(frame.column, isNull); | 71 expect(frame.column, isNull); |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 equals('dart:core/uri.dart 5 in Foo')); | 546 equals('dart:core/uri.dart 5 in Foo')); |
| 547 }); | 547 }); |
| 548 | 548 |
| 549 test('prints relative paths as relative', () { | 549 test('prints relative paths as relative', () { |
| 550 var relative = path.normalize('relative/path/to/foo.dart'); | 550 var relative = path.normalize('relative/path/to/foo.dart'); |
| 551 expect(new Frame.parseFriendly('$relative 5:10 Foo').toString(), | 551 expect(new Frame.parseFriendly('$relative 5:10 Foo').toString(), |
| 552 equals('$relative 5:10 in Foo')); | 552 equals('$relative 5:10 in Foo')); |
| 553 }); | 553 }); |
| 554 }); | 554 }); |
| 555 } | 555 } |
| OLD | NEW |