ThrustAllocator tests: a bad column zeroes the caller's buffer after a good call
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
f78fc421ef
commit
1d031bd273
1 changed files with 8 additions and 0 deletions
|
|
@ -240,6 +240,14 @@ public class ThrustAllocatorTests
|
|||
var nanYaw = Duel();
|
||||
nanYaw[0] = new float3(0, 1, float.NaN);
|
||||
Assert.All(Solve(nanYaw, 0, 1, 0), t => Assert.Equal(0f, t));
|
||||
|
||||
// A bad column zeroes the answer even after a good call left throttles in the warm start and in the caller's buffer.
|
||||
var allocator = new ThrustAllocator();
|
||||
var buffer = new float[4];
|
||||
allocator.Allocate(Duel(), new float2(0, 1), .5f, buffer);
|
||||
Assert.Contains(buffer, t => t > .1f);
|
||||
allocator.Allocate(withNaN, new float2(0, 1), .5f, buffer);
|
||||
Assert.All(buffer, t => Assert.Equal(0f, t));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
|
|
|||
Loading…
Reference in a new issue