Skip to content

test: add mutation testing coverage for survived mutants - #21

Merged
ericodx merged 12 commits into
mainfrom
mutation-test
Apr 7, 2026
Merged

test: add mutation testing coverage for survived mutants#21
ericodx merged 12 commits into
mainfrom
mutation-test

Conversation

@ericodx

@ericodx ericodx commented Apr 7, 2026

Copy link
Copy Markdown
Owner

Summary

Add 99 mutation-killing tests targeting 76 survived mutants across the codebase. Tests cover boundary conditions, operator replacements, arithmetic mutations, and logical operator swaps in detection, tokenization, pipeline, and reporting stages.

Type of Change

  • test: Addition or correction of tests.

Invariants Checklist

  • Detection is deterministic (same input → same output)
  • Source files are never modified (tool is read-only)
  • Source locations are accurate (file, line, column)
  • No false negatives introduced (previously detected clones are still detected)
  • Performance not degraded for large codebases
  • Swift 6 Strict Concurrency compatible
  • Pipeline stages remain stateless pure transformations

Pipeline Impact

Which stages are affected?

  • FileDiscovery
  • Tokenization
  • Normalization
  • Detection (Type 1 / Type 2 / Type 3 / Type 4)
  • Reporting
  • CLI / Configuration
  • Cache / Baseline
  • None

Testing

  • Unit tests added or updated
  • Tests use TokenFactory / TempFileHelper / AnalysisHelper where appropriate
  • Integration tests added or updated (if detection or pipeline logic changed)
  • Both positive cases (expected clones) and negative cases (false positives to avoid) covered
  • All tests pass locally (swift test)

@ericodx ericodx self-assigned this Apr 7, 2026
@ericodx ericodx changed the title Mutation test test: add mutation testing coverage for survived mutants Apr 7, 2026
@ericodx ericodx added the test Addition or correction of tests label Apr 7, 2026
@ericodx
ericodx merged commit cb6cec3 into main Apr 7, 2026
1 check passed
@ericodx
ericodx deleted the mutation-test branch April 7, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Addition or correction of tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant