From 3b9df8487b38849f5b36fc8b81fbaf332680464b Mon Sep 17 00:00:00 2001 From: Meghan Denny Date: Tue, 15 Apr 2025 03:14:03 -0700 Subject: [PATCH] expectSimilarType: use self for checking field types --- src/expectSimilarType.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/expectSimilarType.zig b/src/expectSimilarType.zig index 7353d8116870b296966942565e7f224fbcc25a27..dd9876e44ca06327e15b9688271fb0dff9091ac4 100644 --- a/src/expectSimilarType.zig +++ b/src/expectSimilarType.zig @@ -17,7 +17,7 @@ pub fn expectSimilarType(comptime A: type, comptime B: type) !void { inline for (info_a_s.fields, info_b_s.fields) |fa, fb| { try std.testing.expect(std.mem.eql(u8, fa.name, fb.name)); - try std.testing.expect(fa.type == fb.type); + try expectSimilarType(fa.type, fb.type); try std.testing.expect(fa.alignment == fb.alignment); try std.testing.expect(fa.is_comptime == fb.is_comptime); } @@ -33,7 +33,7 @@ pub fn expectSimilarType(comptime A: type, comptime B: type) !void { inline for (info_a_u.fields, info_b_u.fields) |fa, fb| { try std.testing.expect(std.mem.eql(u8, fa.name, fb.name)); - try std.testing.expect(fa.type == fb.type); + try expectSimilarType(fa.type, fb.type); try std.testing.expect(fa.alignment == fb.alignment); } @@ -53,7 +53,7 @@ pub fn expectSimilarType(comptime A: type, comptime B: type) !void { return; } - @compileError("not implemented"); + try std.testing.expect(A == B); } test { -- 2.54.0