Files
SPIRV-Interpreter/test/basics.zig
Kbz-8 88e847e2d9
Some checks failed
Build / build (push) Successful in 55s
Test / build (push) Failing after 4m26s
improving mul test
2026-01-14 20:14:23 +01:00

30 lines
758 B
Zig

const std = @import("std");
const root = @import("root.zig");
const compileNzsl = root.compileNzsl;
const case = root.case;
test "FMul vec4[f32]" {
const allocator = std.testing.allocator;
const shader =
\\ [nzsl_version("1.1")]
\\ module;
\\
\\ struct FragOut
\\ {
\\ [location(0)] color: vec4[f32]
\\ }
\\
\\ [entry(frag)]
\\ fn main() -> FragOut
\\ {
\\ let output: FragOut;
\\ output.color = vec4[f32](4.0, 3.0, 2.0, 1.0);
\\ return output;
\\ }
;
const code = try compileNzsl(allocator, shader);
defer allocator.free(code);
try case.expectOutput(f32, 4, code, "color", &.{ 4, 3, 2, 1 });
}