| c34693cd | - Add tests for visitors, collections, interpolation, noise, Direction and TargetBlock
- Visitors are compared against a reference flood fill over random masks
(uniqueness, breadth-first order, directions/diagonals, determinism).
- Int2BaseBlockMap is checked against a HashMap model; DoubleArrayList
against ArrayList.
- Direction, TargetBlock ray cases, interpolation and noise invariants.
Four tests are @Disabled because they expose production bugs, which are
intentionally not fixed here:
- LinearInterpolation throws IndexOutOfBounds at t=1.0 (getPosition,
arcLength) and with a single node.
- KochanekBartelsInterpolation.arcLength skips the last trapezoid sample
and underestimates by about 1/8.
- ReparametrisingInterpolation.get1stDerivative returns NaN for
zero-length curves.
| albert pham with Claude Sonnet 5.5 | 12 hours ago |
| 5e7a7e97 | - Add region contract, cuboid, degenerate-shape and selector tests
- RegionContractTest: one parameterised contract (iterator count vs volume,
contains vs iterator, bounding box, chunks/chunk cubes, shift, expand/contract,
clone, flat-region agreement) over Cuboid, Cylinder, Ellipsoid, ConvexPolyhedral,
Polygonal2D, RegionIntersection (incl. walls/faces) and TransformRegion.
- CuboidRegionTest: dimensions/overflow, world Y clamping, expand/contract
direction, faces/walls, chunks, jqwik properties.
- RegionDegenerateShapesTest: undefined/planar hulls, zero/negative height.
- RegionSelectorStateTest: select/clear/isDefined/IncompleteRegionException
state machine for every RegionSelectorType with a mocked World.
- BaseWorldEditTest now stubs the platform's TranslationManager so
WorldEditException subclasses can be constructed in tests.
Bugs found are reproduced in @Disabled tests (production code untouched):
AbstractRegion.getChunks only scans the lowest Y layer; AbstractRegion.getVolume
overflows int subtraction; CuboidRegion iterator breaks at Integer.MIN/MAX_VALUE;
ConvexPolyhedralRegion leaves a stale lastTriangle after addVertex; fractional
radius bounding boxes in Cylinder/Ellipsoid; Cylinder/Ellipsoid contract()
direction flipped and radius clamp grows small shapes; negative cylinder
height; TransformRegion bounds under rotation; RegionIntersection volume is its
bounding box; empty/triangle convex hulls; selector vertex limit off by one and
getPrimaryPosition not throwing.
| albert pham with Claude Sonnet 5.5 | 12 hours ago |