correct test expectations

This commit is contained in:
LemonBoy 2020-02-22 18:02:55 +01:00
parent 495e894225
commit 08047cd6d7
2 changed files with 21 additions and 20 deletions

View File

@ -493,7 +493,7 @@ fn populateModule(di: *ModuleDebugInfo, mod: *Module) !void {
sect_offset += @sizeOf(pdb.DebugSubsectionHeader); sect_offset += @sizeOf(pdb.DebugSubsectionHeader);
switch (subsect_hdr.Kind) { switch (subsect_hdr.Kind) {
pdb.DebugSubsectionKind.FileChecksums => { .FileChecksums => {
mod.checksum_offset = sect_offset; mod.checksum_offset = sect_offset;
break; break;
}, },
@ -1465,7 +1465,7 @@ pub const ModuleDebugInfo = switch (builtin.os) {
sect_offset += @sizeOf(pdb.DebugSubsectionHeader); sect_offset += @sizeOf(pdb.DebugSubsectionHeader);
switch (subsect_hdr.Kind) { switch (subsect_hdr.Kind) {
pdb.DebugSubsectionKind.Lines => { .Lines => {
var line_index = sect_offset; var line_index = sect_offset;
const line_hdr = @ptrCast(*pdb.LineFragmentHeader, &subsect_info[line_index]); const line_hdr = @ptrCast(*pdb.LineFragmentHeader, &subsect_info[line_index]);

View File

@ -3,6 +3,7 @@ const std = @import("std");
const os = std.os; const os = std.os;
const tests = @import("tests.zig"); const tests = @import("tests.zig");
// zig fmt: off
pub fn addCases(cases: *tests.StackTracesContext) void { pub fn addCases(cases: *tests.StackTracesContext) void {
const source_return = const source_return =
\\const std = @import("std"); \\const std = @import("std");
@ -41,7 +42,7 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
\\ try foo(); \\ try foo();
\\} \\}
; ;
// zig fmt: off
switch (builtin.os) { switch (builtin.os) {
.freebsd => { .freebsd => {
cases.addCase( cases.addCase(
@ -264,14 +265,14 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
[_][]const u8{ [_][]const u8{
// debug // debug
\\error: TheSkyIsFalling \\error: TheSkyIsFalling
\\source.zig:4:5: [address] in _main.0 (test.o) \\source.zig:4:5: [address] in main (test)
\\ return error.TheSkyIsFalling; \\ return error.TheSkyIsFalling;
\\ ^ \\ ^
\\ \\
, ,
// release-safe // release-safe
\\error: TheSkyIsFalling \\error: TheSkyIsFalling
\\source.zig:4:5: [address] in _main (test.o) \\source.zig:4:5: [address] in std.start.main (test)
\\ return error.TheSkyIsFalling; \\ return error.TheSkyIsFalling;
\\ ^ \\ ^
\\ \\
@ -291,20 +292,20 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
[_][]const u8{ [_][]const u8{
// debug // debug
\\error: TheSkyIsFalling \\error: TheSkyIsFalling
\\source.zig:4:5: [address] in _foo (test.o) \\source.zig:4:5: [address] in foo (test)
\\ return error.TheSkyIsFalling; \\ return error.TheSkyIsFalling;
\\ ^ \\ ^
\\source.zig:8:5: [address] in _main.0 (test.o) \\source.zig:8:5: [address] in main (test)
\\ try foo(); \\ try foo();
\\ ^ \\ ^
\\ \\
, ,
// release-safe // release-safe
\\error: TheSkyIsFalling \\error: TheSkyIsFalling
\\source.zig:4:5: [address] in _main (test.o) \\source.zig:4:5: [address] in std.start.main (test)
\\ return error.TheSkyIsFalling; \\ return error.TheSkyIsFalling;
\\ ^ \\ ^
\\source.zig:8:5: [address] in _main (test.o) \\source.zig:8:5: [address] in std.start.main (test)
\\ try foo(); \\ try foo();
\\ ^ \\ ^
\\ \\
@ -324,32 +325,32 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
[_][]const u8{ [_][]const u8{
// debug // debug
\\error: TheSkyIsFalling \\error: TheSkyIsFalling
\\source.zig:12:5: [address] in _make_error (test.o) \\source.zig:12:5: [address] in make_error (test)
\\ return error.TheSkyIsFalling; \\ return error.TheSkyIsFalling;
\\ ^ \\ ^
\\source.zig:8:5: [address] in _bar (test.o) \\source.zig:8:5: [address] in bar (test)
\\ return make_error(); \\ return make_error();
\\ ^ \\ ^
\\source.zig:4:5: [address] in _foo (test.o) \\source.zig:4:5: [address] in foo (test)
\\ try bar(); \\ try bar();
\\ ^ \\ ^
\\source.zig:16:5: [address] in _main.0 (test.o) \\source.zig:16:5: [address] in main (test)
\\ try foo(); \\ try foo();
\\ ^ \\ ^
\\ \\
, ,
// release-safe // release-safe
\\error: TheSkyIsFalling \\error: TheSkyIsFalling
\\source.zig:12:5: [address] in _main (test.o) \\source.zig:12:5: [address] in std.start.main (test)
\\ return error.TheSkyIsFalling; \\ return error.TheSkyIsFalling;
\\ ^ \\ ^
\\source.zig:8:5: [address] in _main (test.o) \\source.zig:8:5: [address] in std.start.main (test)
\\ return make_error(); \\ return make_error();
\\ ^ \\ ^
\\source.zig:4:5: [address] in _main (test.o) \\source.zig:4:5: [address] in std.start.main (test)
\\ try bar(); \\ try bar();
\\ ^ \\ ^
\\source.zig:16:5: [address] in _main (test.o) \\source.zig:16:5: [address] in std.start.main (test)
\\ try foo(); \\ try foo();
\\ ^ \\ ^
\\ \\
@ -393,7 +394,7 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
source_try_return, source_try_return,
[_][]const u8{ [_][]const u8{
// debug // debug
\\error: TheSkyIsFalling \\error: TheSkyIsFalling
\\source.zig:4:5: [address] in foo (test.obj) \\source.zig:4:5: [address] in foo (test.obj)
\\ return error.TheSkyIsFalling; \\ return error.TheSkyIsFalling;
\\ ^ \\ ^
@ -419,7 +420,7 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
source_try_try_return_return, source_try_try_return_return,
[_][]const u8{ [_][]const u8{
// debug // debug
\\error: TheSkyIsFalling \\error: TheSkyIsFalling
\\source.zig:12:5: [address] in make_error (test.obj) \\source.zig:12:5: [address] in make_error (test.obj)
\\ return error.TheSkyIsFalling; \\ return error.TheSkyIsFalling;
\\ ^ \\ ^
@ -449,5 +450,5 @@ pub fn addCases(cases: *tests.StackTracesContext) void {
}, },
else => {}, else => {},
} }
// zig fmt: off
} }
// zig fmt: off