From 256f8e20be690b55b88ebee97c54023ae6f8a379 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 26 Sep 2026 02:54:17 +0200 Subject: [PATCH] tests: cover snoise_grad, fbm_grad, ridged_grad mirrors in HLSL compat test Adds explicit function-presence assertions and bumps the reflective bit-parity oracle's expected mirror count from 30 to 33 now that the three new cultmath_ mirrors are covered automatically. Co-Authored-By: Claude Opus 5.5 --- .../tests/CultMath.Tests/HlslSourceCompatibilityTests.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/cultmath/tests/CultMath.Tests/HlslSourceCompatibilityTests.cs b/packages/cultmath/tests/CultMath.Tests/HlslSourceCompatibilityTests.cs index fb269ee2..be8a3df4 100644 --- a/packages/cultmath/tests/CultMath.Tests/HlslSourceCompatibilityTests.cs +++ b/packages/cultmath/tests/CultMath.Tests/HlslSourceCompatibilityTests.cs @@ -27,6 +27,9 @@ public sealed class HlslSourceCompatibilityTests Assert.NotNull(ShaderFunction(shader, "cultmath_value_noise_bicubic", typeof(float2))); Assert.NotNull(ShaderFunction(shader, "cultmath_smin_grad", typeof(float4), typeof(float4), typeof(float))); Assert.NotNull(ShaderFunction(shader, "cultmath_cellular", typeof(float3))); + Assert.NotNull(ShaderFunction(shader, "cultmath_snoise_grad", typeof(float3))); + Assert.NotNull(ShaderFunction(shader, "cultmath_fbm_grad", typeof(float3), typeof(int), typeof(float), typeof(float))); + Assert.NotNull(ShaderFunction(shader, "cultmath_ridged_grad", typeof(float3), typeof(int), typeof(float), typeof(float))); } // HLSL functions carry no access modifier, so they compile as private instance methods. @@ -127,7 +130,7 @@ public sealed class HlslSourceCompatibilityTests } Assert.True(mismatches.Count == 0, $"{mismatches.Count} mismatches:{Environment.NewLine}{string.Join(Environment.NewLine, mismatches.Take(12))}"); - Assert.Equal(30, compared.Count); + Assert.Equal(33, compared.Count); } ///