improving tests
All checks were successful
Build / build (push) Successful in 2m31s
Test / build (push) Successful in 6m48s

This commit is contained in:
2026-03-06 22:34:47 +01:00
parent e09a41754f
commit 7bf671d974
10 changed files with 98 additions and 45 deletions

View File

@@ -72,7 +72,12 @@ test "Maths primitives" {
defer allocator.free(shader);
const code = try compileNzsl(allocator, shader);
defer allocator.free(code);
try case.expectOutput(T, 4, code, "color", &.{ expected, expected, expected, expected });
try case.expect(.{
.source = code,
.expected_outputs = &.{
std.mem.asBytes(&[_]T{ expected, expected, expected, expected }),
},
});
}
}
}
@@ -139,7 +144,12 @@ test "Maths vectors" {
defer allocator.free(shader);
const code = try compileNzsl(allocator, shader);
defer allocator.free(code);
try case.expectOutput(T, L, code, "color", &@as([L]T, expected));
try case.expect(.{
.source = code,
.expected_outputs = &.{
std.mem.asBytes(&@as([L]T, expected)),
},
});
}
}
}