Skip to content

test: add direct unit tests for HLSCM internal components (buildHierarchy, prolongateUVs, solveLSCMLevel) #65

@csparker247

Description

@csparker247

All current HLSCM tests go through the top-level Compute() API. Three internal components — buildHierarchy, prolongateUVs, and solveLSCMLevel — are each 100–200 lines with complex invariants. They are public template functions in detail::hlscm and are directly testable. Without isolation tests, failures are difficult to diagnose.

Items

  • buildHierarchy: Verify level count, vertex counts at each level, that pinned vertices survive decimation, and that localToOriginal/originalToLocal are consistent.
  • prolongateUVs: Verify that each collapsed vertex's UV is correctly reconstructed from its barycentric coordinates. Test the edge case where containingTri = {vKeep, vKeep, vKeep}.
  • solveLSCMLevel: Verify that the solver produces correct UVs on a small known mesh (e.g. pyramid), and that pinned vertices retain their prescribed UV positions.
  • MultiLevelHierarchy test: Currently infers multi-level was triggered indirectly. Expose the level count from buildHierarchy or add a test hook, and assert directly.

Dependencies

  • Depends on F1 (HLSCM) being merged

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions