Commit graph CultLib/tests/GameCult.Geometry.Tests/QuadNormalsTests.cs
Author SHA1 Message Date
Meta Vens
af39e05c21 Kill mutation survivors: degenerate fixtures, missing axis and edge tests
A --since:29e50ad Stryker pass found real gaps, all inside this cut's own
files:

- vertex-placement and normals fixtures anchored a vertex at the world
  origin, so a mutated (+ instead of -) or dropped cellSize multiply was
  invisible against a zero operand; moved them off the origin;
- the cube normals test only checked length, and three orthogonal
  +-2-length face contributions summed to the same length no matter which
  one a mutant negated; now checks the exact expected direction per vertex;
- the open-boundary rule only had an X-axis test, leaving TryGetQuadCells's
  Y- and Z-axis guards (and TryGetOtherEndpoint's Y/Z cases) uncovered;
  added the Y- and Z-axis twins of the existing plane test;
- the 1e-20 near-zero-delta fallback in Interpolate was never exercised;
  added a fixture with an edge delta of ~3e-21;
- CultGeometryGridEdge's Equals and ToString had no direct test.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-25 18:38:15 +02:00
Meta Vens
7a76b89a94 Fix expression-tree-incompatible test lambdas for FluentAssertions OnlyContain
Two spots failed to build: a method-group reference to float.IsFinite and an
`is 1 or 2` pattern inside a lambda that FluentAssertions compiles as an
Expression<Func<T, bool>>; expression trees can't contain pattern-matching
`is`, and a method group isn't implicitly convertible to an expression tree
either. Rewritten as explicit lambdas with `==`/`||`.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-25 18:10:19 +02:00
Meta Vens
09a85edc47 Test surface nets naming, orientation, welding, and normals; scope Stryker to it
Adds SurfaceNetsTests.cs and QuadNormalsTests.cs covering the sign
convention, edge naming, outward winding, vertex placement (midpoint and
unequal-crossing means, origin/cellSize), closed-sphere welding and
Euler characteristic, an ambiguous checkerboard cell's even-but-not-2 edge
usage, open-boundary quad suppression, determinism/ordering, and
face-weighted normals (sliver-vs-large-quad area weighting, unit cube
normals, zero-area/untouched-vertex degenerate case). Adds
stryker-config.json (vstest runner; this project is NUnit 4, not xunit.v3)
and records GameCult.Geometry as scoped, diff-only, in
docs/mutation-testing.md's follow-ups.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-25 18:06:54 +02:00