mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 12:59:04 +00:00
Merge pull request #11729 from ziglang/fix-test-harness
test: correctly track identical error msgs in handled errors list
This commit is contained in:
commit
326b2aa27b
@ -1574,6 +1574,8 @@ pub const TestContext = struct {
|
||||
|
||||
for (actual_errors.list) |actual_error| {
|
||||
for (case_error_list) |case_msg, i| {
|
||||
if (handled_errors[i]) continue;
|
||||
|
||||
const ex_tag: std.meta.Tag(@TypeOf(case_msg)) = case_msg;
|
||||
switch (actual_error) {
|
||||
.src => |actual_msg| {
|
||||
|
||||
@ -36,7 +36,7 @@ fn parseFree(comptime T: type, value: T, allocator: std.mem.Allocator) void {
|
||||
}
|
||||
|
||||
pub export fn entry() void {
|
||||
const allocator = std.testing.allocator_instance.allocator();
|
||||
const allocator = std.testing.failing_allocator;
|
||||
_ = parse(std.StringArrayHashMap(bool), allocator) catch return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user