Skip to content

Add tests for truncation feature #18

@pjt222

Description

@pjt222

Context

The truncation feature was added in commits 338da13 and a611b2e but has no test coverage.

Files affected:

  • R/spiral_math.R - truncate_spiral_points() function
  • R/ui_controls.R - truncation UI controls

Test Cases Needed

  1. Basic functionality

    • Truncation with factor=2.0 (default)
    • Truncation with factor=1.0 (aggressive, ~50% points)
    • Truncation with factor=0.1 (minimum allowed)
  2. Edge cases

    • Factor < 0.1 should error
    • Factor that removes all but minimum points
    • Empty input handling
    • Single point input
  3. Integration with Voronoi

    • Verify truncated points produce valid Voronoi diagrams
    • Cache keys include truncation parameters

Related

Priority: High

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions