authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-02-22 18:02:55+01:00
committergravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-02-23 22:47:48+01:00
log08047cd6d710603a5391c9e88a7369f5dcfa196f
treee56f0f1a34d7ba351400c8588d3216f97855b33f
parent495e894225d3bb5695681be87ed0cd1b7f9825a2

correct test expectations


2 files changed, 21 insertions(+), 20 deletions(-)

lib/std/debug.zig+2-2
......@@ -493,7 +493,7 @@ fn populateModule(di: *ModuleDebugInfo, mod: *Module) !void {
493493 sect_offset += @sizeOf(pdb.DebugSubsectionHeader);
494494
495495 switch (subsect_hdr.Kind) {
496 pdb.DebugSubsectionKind.FileChecksums => {
496 .FileChecksums => {
497497 mod.checksum_offset = sect_offset;
498498 break;
499499 },
......@@ -1465,7 +1465,7 @@ pub const ModuleDebugInfo = switch (builtin.os) {
14651465 sect_offset += @sizeOf(pdb.DebugSubsectionHeader);
14661466
14671467 switch (subsect_hdr.Kind) {
1468 pdb.DebugSubsectionKind.Lines => {
1468 .Lines => {
14691469 var line_index = sect_offset;
14701470
14711471 const line_hdr = @ptrCast(*pdb.LineFragmentHeader, &subsect_info[line_index]);
test/stack_traces.zig+19-18
......@@ -3,6 +3,7 @@ const std = @import("std");
33const os = std.os;
44const tests = @import("tests.zig");
55
6// zig fmt: off
67pub fn addCases(cases: *tests.StackTracesContext) void {
78 const source_return =
89 \\const std = @import("std");
......@@ -41,7 +42,7 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
4142 \\ try foo();
4243 \\}
4344 ;
44 // zig fmt: off
45
4546 switch (builtin.os) {
4647 .freebsd => {
4748 cases.addCase(
......@@ -264,14 +265,14 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
264265 [_][]const u8{
265266 // debug
266267 \\error: TheSkyIsFalling
267 \\source.zig:4:5: [address] in _main.0 (test.o)
268 \\source.zig:4:5: [address] in main (test)
268269 \\ return error.TheSkyIsFalling;
269270 \\ ^
270271 \\
271272 ,
272273 // release-safe
273274 \\error: TheSkyIsFalling
274 \\source.zig:4:5: [address] in _main (test.o)
275 \\source.zig:4:5: [address] in std.start.main (test)
275276 \\ return error.TheSkyIsFalling;
276277 \\ ^
277278 \\
......@@ -291,20 +292,20 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
291292 [_][]const u8{
292293 // debug
293294 \\error: TheSkyIsFalling
294 \\source.zig:4:5: [address] in _foo (test.o)
295 \\source.zig:4:5: [address] in foo (test)
295296 \\ return error.TheSkyIsFalling;
296297 \\ ^
297 \\source.zig:8:5: [address] in _main.0 (test.o)
298 \\source.zig:8:5: [address] in main (test)
298299 \\ try foo();
299300 \\ ^
300301 \\
301302 ,
302303 // release-safe
303304 \\error: TheSkyIsFalling
304 \\source.zig:4:5: [address] in _main (test.o)
305 \\source.zig:4:5: [address] in std.start.main (test)
305306 \\ return error.TheSkyIsFalling;
306307 \\ ^
307 \\source.zig:8:5: [address] in _main (test.o)
308 \\source.zig:8:5: [address] in std.start.main (test)
308309 \\ try foo();
309310 \\ ^
310311 \\
......@@ -324,32 +325,32 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
324325 [_][]const u8{
325326 // debug
326327 \\error: TheSkyIsFalling
327 \\source.zig:12:5: [address] in _make_error (test.o)
328 \\source.zig:12:5: [address] in make_error (test)
328329 \\ return error.TheSkyIsFalling;
329330 \\ ^
330 \\source.zig:8:5: [address] in _bar (test.o)
331 \\source.zig:8:5: [address] in bar (test)
331332 \\ return make_error();
332333 \\ ^
333 \\source.zig:4:5: [address] in _foo (test.o)
334 \\source.zig:4:5: [address] in foo (test)
334335 \\ try bar();
335336 \\ ^
336 \\source.zig:16:5: [address] in _main.0 (test.o)
337 \\source.zig:16:5: [address] in main (test)
337338 \\ try foo();
338339 \\ ^
339340 \\
340341 ,
341342 // release-safe
342343 \\error: TheSkyIsFalling
343 \\source.zig:12:5: [address] in _main (test.o)
344 \\source.zig:12:5: [address] in std.start.main (test)
344345 \\ return error.TheSkyIsFalling;
345346 \\ ^
346 \\source.zig:8:5: [address] in _main (test.o)
347 \\source.zig:8:5: [address] in std.start.main (test)
347348 \\ return make_error();
348349 \\ ^
349 \\source.zig:4:5: [address] in _main (test.o)
350 \\source.zig:4:5: [address] in std.start.main (test)
350351 \\ try bar();
351352 \\ ^
352 \\source.zig:16:5: [address] in _main (test.o)
353 \\source.zig:16:5: [address] in std.start.main (test)
353354 \\ try foo();
354355 \\ ^
355356 \\
......@@ -393,7 +394,7 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
393394 source_try_return,
394395 [_][]const u8{
395396 // debug
396 \\error: TheSkyIsFalling
397 \\error: TheSkyIsFalling
397398 \\source.zig:4:5: [address] in foo (test.obj)
398399 \\ return error.TheSkyIsFalling;
399400 \\ ^
......@@ -419,7 +420,7 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
419420 source_try_try_return_return,
420421 [_][]const u8{
421422 // debug
422 \\error: TheSkyIsFalling
423 \\error: TheSkyIsFalling
423424 \\source.zig:12:5: [address] in make_error (test.obj)
424425 \\ return error.TheSkyIsFalling;
425426 \\ ^
......@@ -449,5 +450,5 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
449450 },
450451 else => {},
451452 }
452 // zig fmt: off
453453}
454// zig fmt: off