summaryrefslogtreecommitdiff
path: root/src/gui/Post.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/Post.zig')
-rw-r--r--src/gui/Post.zig14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gui/Post.zig b/src/gui/Post.zig
index fc256135..8d0e14d9 100644
--- a/src/gui/Post.zig
+++ b/src/gui/Post.zig
@@ -610,13 +610,13 @@ const GhosttyUniforms = extern struct {
};
test "the uniform block is ghostty's, offset for offset, and the prefix names it in that order" {
- const ours = @typeInfo(Uniforms).@"struct".fields;
- const theirs = @typeInfo(GhosttyUniforms).@"struct".fields;
- try std.testing.expectEqual(theirs.len, ours.len);
+ const ours = @typeInfo(Uniforms).@"struct";
+ const theirs = @typeInfo(GhosttyUniforms).@"struct";
+ try std.testing.expectEqual(theirs.field_names.len, ours.field_names.len);
try std.testing.expectEqual(@sizeOf(GhosttyUniforms), @sizeOf(Uniforms));
- inline for (ours, theirs) |a, b| {
- try std.testing.expectEqual(@offsetOf(GhosttyUniforms, b.name), @offsetOf(Uniforms, a.name));
- try std.testing.expectEqual(b.type, a.type);
+ inline for (ours.field_names, ours.field_types, theirs.field_names, theirs.field_types) |a, a_type, b, b_type| {
+ try std.testing.expectEqual(@offsetOf(GhosttyUniforms, b), @offsetOf(Uniforms, a));
+ try std.testing.expectEqual(b_type, a_type);
}
// By NAME: iSelectionForegroundColor sits where ghostty's Zig says
// selection_background, which is where its GLSL puts the foreground.
@@ -633,7 +633,7 @@ test "the uniform block is ghostty's, offset for offset, and the prefix names it
.{ "vec3", "iBackgroundColor" }, .{ "vec3", "iForegroundColor" }, .{ "vec3", "iCursorColor" },
.{ "vec3", "iCursorText" }, .{ "vec3", "iSelectionForegroundColor" }, .{ "vec3", "iSelectionBackgroundColor" },
};
- try std.testing.expectEqual(ours.len, glsl.len);
+ try std.testing.expectEqual(ours.field_names.len, glsl.len);
// Its three blocks (Globals, Palette, Colors) read as one, in order.
const start = std.mem.indexOf(u8, prefix, "uniform Globals {").?;
const end = std.mem.indexOf(u8, prefix, "uniform PardesPost {").?;