authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-04-15 03:14:03 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2025-04-15 03:14:03 -07:00
log3b9df8487b38849f5b36fc8b81fbaf332680464b
treea13aad54c5e84d62ce2301392f01960e9f516a78
parentdf1831b12208f511e1c20d7f8c91a5984f7d15df

expectSimilarType: use self for checking field types


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

src/expectSimilarType.zig+3-3
......@@ -17,7 +17,7 @@ pub fn expectSimilarType(comptime A: type, comptime B: type) !void {
1717
1818 inline for (info_a_s.fields, info_b_s.fields) |fa, fb| {
1919 try std.testing.expect(std.mem.eql(u8, fa.name, fb.name));
20 try std.testing.expect(fa.type == fb.type);
20 try expectSimilarType(fa.type, fb.type);
2121 try std.testing.expect(fa.alignment == fb.alignment);
2222 try std.testing.expect(fa.is_comptime == fb.is_comptime);
2323 }
......@@ -33,7 +33,7 @@ pub fn expectSimilarType(comptime A: type, comptime B: type) !void {
3333
3434 inline for (info_a_u.fields, info_b_u.fields) |fa, fb| {
3535 try std.testing.expect(std.mem.eql(u8, fa.name, fb.name));
36 try std.testing.expect(fa.type == fb.type);
36 try expectSimilarType(fa.type, fb.type);
3737 try std.testing.expect(fa.alignment == fb.alignment);
3838 }
3939
......@@ -53,7 +53,7 @@ pub fn expectSimilarType(comptime A: type, comptime B: type) !void {
5353
5454 return;
5555 }
56 @compileError("not implemented");
56 try std.testing.expect(A == B);
5757}
5858
5959test {