authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2022-05-26 21:00:40+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2022-05-26 21:00:40+02:00
log326b2aa27bdf43b695798192e415db995ee9918b
tree76660b5e692081bf7ed57d9a192dd7c5b05604fd
parent7deae071014237e995ec3017825f7534305ec0c4
parent5ce9c878cf83b5d8ab0407b798fe4aa35768c498
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #11729 from ziglang/fix-test-harness

test: correctly track identical error msgs in handled errors list

2 files changed, 3 insertions(+), 1 deletions(-)

src/test.zig+2
......@@ -1574,6 +1574,8 @@ pub const TestContext = struct {
15741574
15751575 for (actual_errors.list) |actual_error| {
15761576 for (case_error_list) |case_msg, i| {
1577 if (handled_errors[i]) continue;
1578
15771579 const ex_tag: std.meta.Tag(@TypeOf(case_msg)) = case_msg;
15781580 switch (actual_error) {
15791581 .src => |actual_msg| {
test/cases/compile_errors/dereference_anyopaque.zig+1-1
......@@ -36,7 +36,7 @@ fn parseFree(comptime T: type, value: T, allocator: std.mem.Allocator) void {
3636}
3737
3838pub export fn entry() void {
39 const allocator = std.testing.allocator_instance.allocator();
39 const allocator = std.testing.failing_allocator;
4040 _ = parse(std.StringArrayHashMap(bool), allocator) catch return;
4141}
4242