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

Side by Side Diff: tests/language/full_stacktrace2_test.dart

Issue 2687143005: Include metadata in AOT to expand inline frames in stack traces and provide line numbers. (Closed)
Patch Set: . Created 3 years, 10 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
« no previous file with comments | « tests/language/full_stacktrace1_test.dart ('k') | tests/language/full_stacktrace3_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 // (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // (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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 void func1() { 7 void func1() {
8 throw new Exception("Test full stacktrace"); 8 throw new Exception("Test full stacktrace");
9 } 9 }
10 void func2() { 10 void func2() {
11 func1(); 11 func1();
12 } 12 }
13 void func3() { 13 void func3() {
14 try { 14 try {
15 func2(); 15 func2();
16 } on Object catch(e, s) { 16 } on Object catch(e, s) {
17 var fullTrace = s.toString(); 17 var fullTrace = s.toString();
18 print(fullTrace);
18 Expect.isTrue(fullTrace.contains("func1")); 19 Expect.isTrue(fullTrace.contains("func1"));
19 Expect.isTrue(fullTrace.contains("func2")); 20 Expect.isTrue(fullTrace.contains("func2"));
20 Expect.isTrue(fullTrace.contains("func3")); 21 Expect.isTrue(fullTrace.contains("func3"));
21 Expect.isTrue(fullTrace.contains("func4")); 22 Expect.isTrue(fullTrace.contains("func4"));
22 Expect.isTrue(fullTrace.contains("func5")); 23 Expect.isTrue(fullTrace.contains("func5"));
23 Expect.isTrue(fullTrace.contains("func6")); 24 Expect.isTrue(fullTrace.contains("func6"));
24 Expect.isTrue(fullTrace.contains("func7")); 25 Expect.isTrue(fullTrace.contains("func7"));
25 Expect.isTrue(fullTrace.contains("main")); 26 Expect.isTrue(fullTrace.contains("main"));
26 27
27 rethrow; // This is a rethrow. 28 rethrow; // This is a rethrow.
28 } 29 }
29 } 30 }
30 int func4() { 31 int func4() {
31 func3(); 32 func3();
32 return 1; 33 return 1;
33 } 34 }
34 int func5() { 35 int func5() {
35 try { 36 try {
36 func4(); 37 func4();
37 } on Object catch(e, s) { 38 } on Object catch(e, s) {
38 var fullTrace = s.toString(); 39 var fullTrace = s.toString();
40 print(fullTrace);
39 Expect.isTrue(fullTrace.contains("func1")); 41 Expect.isTrue(fullTrace.contains("func1"));
40 Expect.isTrue(fullTrace.contains("func2")); 42 Expect.isTrue(fullTrace.contains("func2"));
41 Expect.isTrue(fullTrace.contains("func3")); 43 Expect.isTrue(fullTrace.contains("func3"));
42 Expect.isTrue(fullTrace.contains("func4")); 44 Expect.isTrue(fullTrace.contains("func4"));
43 Expect.isTrue(fullTrace.contains("func5")); 45 Expect.isTrue(fullTrace.contains("func5"));
44 Expect.isTrue(fullTrace.contains("func6")); 46 Expect.isTrue(fullTrace.contains("func6"));
45 Expect.isTrue(fullTrace.contains("func7")); 47 Expect.isTrue(fullTrace.contains("func7"));
46 Expect.isTrue(fullTrace.contains("main")); 48 Expect.isTrue(fullTrace.contains("main"));
47 } 49 }
48 return 1; 50 return 1;
49 } 51 }
50 int func6() { 52 int func6() {
51 func5(); 53 func5();
52 return 1; 54 return 1;
53 } 55 }
54 int func7() { 56 int func7() {
55 func6(); 57 func6();
56 return 1; 58 return 1;
57 } 59 }
58 main() { 60 main() {
59 var i = func7(); 61 var i = func7();
60 Expect.equals(1, i); 62 Expect.equals(1, i);
61 } 63 }
OLDNEW
« no previous file with comments | « tests/language/full_stacktrace1_test.dart ('k') | tests/language/full_stacktrace3_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698