Skip to content

Reference tests: the smaller gaps (collision, math, allocator, container, shape names and flags, joint disable, manifold points, broad phase stress, SIMD width) #146

Closed

Description

@nicolas-maman

From the audit of the reference's tests (e77352c): the smaller gaps, each in a file that is otherwise ported.

  • test_collision.c: AABBTest's inverted box; the ray cases ending inside, wholly inside, parallel within the slab, a point outside, through a corner and along a face; LargeWorldManifoldTest and LargeWorldAABBTest checked directly. (Ported in the PR for Port the rest of the reference's benchmark suite (design item 16): nine scenes and the SAT runs #141 as tests/test_collision.ae.)
  • test_math.c, MathTest: Matrix2 invert and solve (math.invert2, math.solve2 exist untested); the NLerp twist-angle sweep (math.nlerp untested); ArbitraryPerp on the given normal; the full 3x3 m inv(m) components.
  • test_allocator.c: TestBlockAllocate, TestBlockClear and TestBlockAlignment. basics.block_allocator_* exists but is not tested.
  • test_container.c: TestArrayRemove (reserve capacity, remove-swap draining the array while summing); TestArrayPop (resize, pop to empty); TestStructWithArray.
  • test_shape.c: ShapeNameTest (a name on ShapeDef, clearing with null, the over-length truncation) and ShapeFlagsTest (all four flags set from the def, then one flipped while the others hold).
  • test_joint.c, TestNonDynamicJointDisable: the set_type path (a dynamic pair welded, then static and kinematic, disabled and enabled, back to dynamic, the joint awake). The direct static-kinematic case is covered.
  • test_manifold.c, MaxPointCountTest: get_max_manifold_points equal to the manifold's point capacity.
  • test_broad_phase.c: StaticRebuildKeepsMarks (a static body teleported with set_transform, then rebuild_static_tree, then its contact found) and BroadPhaseStressTest (a swarm churning every mutation over height-field tiles: transforms, types, disable and enable, destroy and create, bullets, a collide-connected weld, sleep; the pair set checked against brute force after every step at 1, 4 and 3 workers).
  • test_determinism.c, SIMDWidthTest: the RollingMix scene at width 4 and width 8 in one process, bit for bit. The CI's golden trace across -mavx2 builds covers the width as a whole.

Activity

  1. nicolas-maman commented on Oct 9, 2026

    @nicolas-maman
    CollaboratorAuthor

    #153 ported: test_collision.c whole (tests/test_collision.ae); test_math.c's remaining checks (m inv(m) components, the 2x2 inverse and solve, the nlerp twist sweep, arbitrary_perp, now in the math module); test_allocator.c and test_container.c's partials; test_shape.c's ShapeFlagsTest; test_joint.c's TestNonDynamicJointDisable on its set_type path; test_broad_phase.c's StaticRebuildKeepsMarks both ways. Left: ShapeNameTest and MaxPointCountTest (they need #148's API), BroadPhaseStressTest, and SIMDWidthTest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions