@@ -18,12 +18,13 @@ void g() {
18
18
19
19
runtimeFalse () => int .parse ('1' ) == 0 ;
20
20
21
- // `expectedFrames` is (String , line, column) of the frames we check.
21
+ // `expectedFrames` is (file , line, column, name ) of the frames we check.
22
22
//
23
23
// Information we don't check are "null": we don't want to check line/column
24
24
// of standard library functions to avoid breaking the test with unrelated
25
25
// changes to the standard library.
26
- void testMain (String testName, List <(String ?, int ?, int ?)?> expectedFrames) {
26
+ void testMain (
27
+ String testName, List <(String ?, int ?, int ?, String ?)?> expectedFrames) {
27
28
// Use `f` and `g` in a few places to make sure wasm-opt won't inline them
28
29
// in the test.
29
30
final fTearOff = f;
@@ -69,7 +70,8 @@ void testMain(String testName, List<(String?, int?, int?)?> expectedFrames) {
69
70
}
70
71
if ((expected.$1 != null && actual.$1 != expected.$1) ||
71
72
(expected.$2 != null && actual.$2 != expected.$2) ||
72
- (expected.$3 != null && actual.$3 != expected.$3)) {
73
+ (expected.$3 != null && actual.$3 != expected.$3) ||
74
+ (expected.$4 != null && actual.$4 != expected.$4)) {
73
75
throw 'Mismatch:\n Expected: $expected \n Actual: $actual ' ;
74
76
}
75
77
}
@@ -112,9 +114,9 @@ Mapping getSourceMapping(String testName) {
112
114
return allMappings;
113
115
}
114
116
115
- List <(String ?, int ?, int ?)?> parseStack (
117
+ List <(String ?, int ?, int ?, String ? )?> parseStack (
116
118
String testName, Mapping mapping, String stackTraceString) {
117
- final parsed = < (String ? , int ? , int ? )? > [];
119
+ final parsed = < (String ? , int ? , int ? , String ? )? > [];
118
120
for (final line in stackTraceString.split ('\n ' )) {
119
121
if (line.contains ('.mjs' ) || line.contains ('.js' )) {
120
122
parsed.add (null );
@@ -145,7 +147,8 @@ List<(String?, int?, int?)?> parseStack(
145
147
final filename = span.sourceUrl! .pathSegments.last;
146
148
final lineNumber = span.start.line;
147
149
final columnNumber = span.start.column;
148
- parsed.add ((filename, 1 + lineNumber, 1 + columnNumber));
150
+ final symbolName = span.text;
151
+ parsed.add ((filename, 1 + lineNumber, 1 + columnNumber, symbolName));
149
152
}
150
153
return parsed;
151
154
}
0 commit comments