| author | |
| committer | |
| log | 326b2aa27bdf43b695798192e415db995ee9918b |
| tree | 76660b5e692081bf7ed57d9a192dd7c5b05604fd |
| parent | 7deae071014237e995ec3017825f7534305ec0c4 |
| parent | 5ce9c878cf83b5d8ab0407b798fe4aa35768c498 |
| signature |
test: correctly track identical error msgs in handled errors list2 files changed, 3 insertions(+), 1 deletions(-)
src/test.zig+2| ... | @@ -1574,6 +1574,8 @@ pub const TestContext = struct { | ... | @@ -1574,6 +1574,8 @@ pub const TestContext = struct { |
| 1574 | 1574 | ||
| 1575 | for (actual_errors.list) |actual_error| { | 1575 | for (actual_errors.list) |actual_error| { |
| 1576 | for (case_error_list) |case_msg, i| { | 1576 | for (case_error_list) |case_msg, i| { |
| 1577 | if (handled_errors[i]) continue; | ||
| 1578 | |||
| 1577 | const ex_tag: std.meta.Tag(@TypeOf(case_msg)) = case_msg; | 1579 | const ex_tag: std.meta.Tag(@TypeOf(case_msg)) = case_msg; |
| 1578 | switch (actual_error) { | 1580 | switch (actual_error) { |
| 1579 | .src => |actual_msg| { | 1581 | .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 { | ... | @@ -36,7 +36,7 @@ fn parseFree(comptime T: type, value: T, allocator: std.mem.Allocator) void { |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | pub export fn entry() void { | 38 | pub export fn entry() void { |
| 39 | const allocator = std.testing.allocator_instance.allocator(); | 39 | const allocator = std.testing.failing_allocator; |
| 40 | _ = parse(std.StringArrayHashMap(bool), allocator) catch return; | 40 | _ = parse(std.StringArrayHashMap(bool), allocator) catch return; |
| 41 | } | 41 | } |
| 42 | 42 |