CultLib/packages/cultmath/tests/CultMath.Tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Meta Vens fd75c2acf9 Test that the float2 radial falloff overload accumulates, not assigns
Soul's pass on 41440cb found BatchMath.cs:115
(AddRadialFalloffAcceleration2D(ReadOnlySpan<float2>, ...)) accumulates
onto the caller's acceleration buffer, but no test ever seeded that
buffer with nonzero values: mutating += to = passed all 133 tests. The
float-array overload already had this guard
(RadialFalloffAccumulatesOntoExistingAcceleration); add the float2
equivalent, with a nonzero, per-element-distinct starting buffer, mixing
in-range and out-of-range particles so both the accumulated and
unchanged-seed cases are checked.

Checked every other += site in BatchMath.cs for the same gap: the
array-overload's scalar tail and vector body, and both
IntegrateSemiImplicitEuler2D overloads, all already seed their
accumulator buffers (vx/vy/px/py, velocity/position) with nonzero,
per-element values in their existing tests. Only this one site was bare.

Verified by hand-mutating BatchMath.cs:115 (+= to =): the new test fails
(expected 6.78, actual 0.48); reverted the source byte-exactly after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 20:13:05 +02:00
..
BatchMathTests.cs Test that the float2 radial falloff overload accumulates, not assigns 2026-09-24 20:13:05 +02:00
CultMath.Tests.csproj Compile the real HLSL mirror as C# and with dxc; fix its errors 2026-09-14 13:57:03 +02:00
CultMath.Tests.csproj.meta Move CultMath into the CultLib monorepo 2026-08-26 17:35:51 +02:00
FirstOrderInterceptTests.cs Fix a tolerance-overload bug that made intercept precision asserts inert 2026-09-24 19:38:30 +02:00
HlslMirrorTests.cs Add PCG integer hashes to CultMath and release 0.2.3 2026-09-14 18:19:53 +02:00
HlslMirrorTests.cs.meta Move CultMath into the CultLib monorepo 2026-08-26 17:35:51 +02:00
HlslSemanticsTests.cs Add PCG integer hashes to CultMath and release 0.2.3 2026-09-14 18:19:53 +02:00
HlslSemanticsTests.cs.meta Make CultMath HLSL-shaped: writable components, bool-vector comparisons 2026-09-14 13:29:59 +02:00
HlslSourceCompatibilityTests.cs Add PCG integer hashes to CultMath and release 0.2.3 2026-09-14 18:19:53 +02:00
HlslSourceCompatibilityTests.cs.meta Make CultMath HLSL-shaped: writable components, bool-vector comparisons 2026-09-14 13:29:59 +02:00
MathTests.cs Add PCG integer hashes to CultMath and release 0.2.3 2026-09-14 18:19:53 +02:00
MathTests.cs.meta Move CultMath into the CultLib monorepo 2026-08-26 17:35:51 +02:00
stryker-config.json Pin mtp test-runner for CultMath and document mutation testing 2026-09-22 21:24:05 +02:00
VectorEqualityTests.cs Tie the scalar comparison overloads too, not just vector-vector 2026-09-24 19:49:23 +02:00