Skip to content

Recast characterization tests - #4

Open
OursCodeur wants to merge 2 commits into
OpenMW:openmw-fixesfrom
OursCodeur:split/recast-characterization-tests
Open

Recast characterization tests#4
OursCodeur wants to merge 2 commits into
OpenMW:openmw-fixesfrom
OursCodeur:split/recast-characterization-tests

Conversation

@OursCodeur

@OursCodeur OursCodeur commented Aug 18, 2026

Copy link
Copy Markdown

#5 changes how rasterization and the ledge filter are implemented. Before that lands I'd like the behaviour they have today written down as tests, so that "the output didn't change" is something you can check rather than something I assert.

These tests accept openmw-fixes as it is. They're not written to fail the current implementation anywhere, and if one of them fails after #5 then #5 is wrong.

Rasterization is checked against an independent path : generic polygon clipping plus repeated single-triangle insertion, which reaches the same spans through code that shares nothing with the bulk overloads. The matrix covers every bulk overload, area and merge behaviour, the grid and heightfield boundaries, triangles that land in a single voxel, arrival order between spans that touch, and a heightfield that already had spans in it before the call.

rcFilterLedgeSpans is checked against a linked-list reference scan over deterministic multi-span columns, built so neighbours differ in the ways the filter actually branches on.

state cases assertions
openmw-fixes at 03259f3 47 1,355
plus rasterization tests 51 6,313
plus ledge filter tests 52 25,065

The assertion count is large because each case compares the complete span stream over a generated matrix of inputs, not because the same trivial check is repeated. If that ratio bothers you I can collapse the matrices, it just costs coverage of the boundary cases.

3 test files, +540/−1, no production file touched. #5 depends on this, but this one stands on its own and can be read without agreeing to anything in #5.

Tests 3/3 green on Linux, macOS and Windows. Build is 14/18 with the four VS2019 jobs queued on unavailable runners, which is what #3 is about.

@OursCodeur OursCodeur changed the title Split/recast characterization tests Recast characterization tests Aug 18, 2026
@OursCodeur
OursCodeur marked this pull request as ready for review August 18, 2026 21:08
@OursCodeur
OursCodeur force-pushed the split/recast-characterization-tests branch from e4b6cda to 6cda540 Compare August 19, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant