renderer(metal): fix tests

This commit is contained in:
Leah Amelia Chen
2024-09-03 20:41:11 +02:00
parent 83bcf939fd
commit f0db0c850b

View File

@ -241,7 +241,7 @@ test Contents {
// Add some contents.
const bg_cell: mtl_shaders.CellBg = .{ 0, 0, 0, 1 };
const fg_cell: mtl_shaders.CellText = .{
.mode = .fg,
.mode = .{ .fg = true },
.grid_pos = .{ 4, 1 },
.color = .{ 0, 0, 0, 1 },
};
@ -262,7 +262,10 @@ test Contents {
// Add a cursor.
const cursor_cell: mtl_shaders.CellText = .{
.mode = .cursor,
.mode = .{
.fg = false,
.cursor = true,
},
.grid_pos = .{ 2, 3 },
.color = .{ 0, 0, 0, 1 },
};
@ -289,7 +292,7 @@ test "Contents clear retains other content" {
// bg and fg cells in row 1
const bg_cell_1: mtl_shaders.CellBg = .{ 0, 0, 0, 1 };
const fg_cell_1: mtl_shaders.CellText = .{
.mode = .fg,
.mode = .{ .fg = true },
.grid_pos = .{ 4, 1 },
.color = .{ 0, 0, 0, 1 },
};
@ -298,7 +301,7 @@ test "Contents clear retains other content" {
// bg and fg cells in row 2
const bg_cell_2: mtl_shaders.CellBg = .{ 0, 0, 0, 1 };
const fg_cell_2: mtl_shaders.CellText = .{
.mode = .fg,
.mode = .{ .fg = true },
.grid_pos = .{ 4, 2 },
.color = .{ 0, 0, 0, 1 },
};
@ -329,7 +332,7 @@ test "Contents clear last added content" {
// bg and fg cells in row 1
const bg_cell_1: mtl_shaders.CellBg = .{ 0, 0, 0, 1 };
const fg_cell_1: mtl_shaders.CellText = .{
.mode = .fg,
.mode = .{ .fg = true },
.grid_pos = .{ 4, 1 },
.color = .{ 0, 0, 0, 1 },
};
@ -338,7 +341,7 @@ test "Contents clear last added content" {
// bg and fg cells in row 2
const bg_cell_2: mtl_shaders.CellBg = .{ 0, 0, 0, 1 };
const fg_cell_2: mtl_shaders.CellText = .{
.mode = .fg,
.mode = .{ .fg = true },
.grid_pos = .{ 4, 2 },
.color = .{ 0, 0, 0, 1 },
};