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

@@ -44,7 +44,12 @@ test "Simple function calls" {
defer allocator.free(shader);
const code = try compileNzsl(allocator, shader);
defer allocator.free(code);
try case.expectOutput(T, 4, code, "color", &.{ n, n, n, n });
try case.expect(.{
.source = code,
.expected_outputs = &.{
std.mem.asBytes(&[_]T{ n, n, n, n }),
},
});
}
}
@@ -95,6 +100,11 @@ test "Nested function calls" {
defer allocator.free(shader);
const code = try compileNzsl(allocator, shader);
defer allocator.free(code);
try case.expectOutput(T, 4, code, "color", &.{ n, n, n, n });
try case.expect(.{
.source = code,
.expected_outputs = &.{
std.mem.asBytes(&[_]T{ n, n, n, n }),
},
});
}
}