OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 /// VMOptions=--dwarf-stack-traces | 5 /// VMOptions=--dwarf-stack-traces |
6 | 6 |
7 import 'package:unittest/unittest.dart'; | 7 import 'package:unittest/unittest.dart'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 | 9 |
10 bar() { | 10 bar() { |
11 // Keep the 'throw' and its argument on separate lines. | 11 // Keep the 'throw' and its argument on separate lines. |
12 throw "Hello, Dwarf!"; | 12 throw // force linebreak with dartfmt |
| 13 "Hello, Dwarf!"; |
13 } | 14 } |
14 | 15 |
15 foo() { | 16 foo() { |
16 bar(); | 17 bar(); |
17 } | 18 } |
18 | 19 |
19 main() { | 20 main() { |
20 String rawStack; | 21 String rawStack; |
21 try { | 22 try { |
22 foo(); | 23 foo(); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 "bar", | 98 "bar", |
98 "dwarf_stack_trace_test.dart:12", | 99 "dwarf_stack_trace_test.dart:12", |
99 "foo", | 100 "foo", |
100 "dwarf_stack_trace_test.dart:17", | 101 "dwarf_stack_trace_test.dart:17", |
101 "main", | 102 "main", |
102 "dwarf_stack_trace_test.dart:23", | 103 "dwarf_stack_trace_test.dart:23", |
103 "main", // dispatcher | 104 "main", // dispatcher |
104 "dwarf_stack_trace_test.dart:20" | 105 "dwarf_stack_trace_test.dart:20" |
105 ])); | 106 ])); |
106 } | 107 } |
OLD | NEW |