Skip to content

Add real unit tests for core math, util, UID, and shape logic#610

Open
aalex wants to merge 1 commit into
devfrom
claude/test-coverage-analysis-aopAm
Open

Add real unit tests for core math, util, UID, and shape logic#610
aalex wants to merge 1 commit into
devfrom
claude/test-coverage-analysis-aopAm

Conversation

@aalex
Copy link
Copy Markdown
Member

@aalex aalex commented May 23, 2026

Replace the placeholder TestMaths (which only exercised Qt's
QString::toUpper) with unit tests that cover production code:

  • TestMaths: degree/radian conversion, wrapAround, distance helpers, xOr
  • TestUtil: map_float/map_int range mapping and clipping, isNumeric,
    fileExists/eraseFile
  • TestUidAllocator: sequential allocation, lowest-id reuse, reserve, free
  • TestShape: vertex accessors, getCenter, includesPoint, translate,
    applyTransform, polygon round-trip

The test project compiles the real MapMap sources under test and runs
all suites from a single binary via a custom QtTest runner.

https://claude.ai/code/session_01BCDcXvWxedEm95hpuVyZYC

Replace the placeholder TestMaths (which only exercised Qt's
QString::toUpper) with unit tests that cover production code:

- TestMaths: degree/radian conversion, wrapAround, distance helpers, xOr
- TestUtil: map_float/map_int range mapping and clipping, isNumeric,
  fileExists/eraseFile
- TestUidAllocator: sequential allocation, lowest-id reuse, reserve, free
- TestShape: vertex accessors, getCenter, includesPoint, translate,
  applyTransform, polygon round-trip

The test project compiles the real MapMap sources under test and runs
all suites from a single binary via a custom QtTest runner.

https://claude.ai/code/session_01BCDcXvWxedEm95hpuVyZYC
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.

2 participants