Skip to content

Improve test coverage #73

@WestonVoglesonger

Description

@WestonVoglesonger

The suite already covers the core surfaces (canonicalize ×3, checkers, create-target, predict, sampling, options), and test-coverage.yaml already runs covr and uploads to Codecov in CI. But some surfaces are thin or untested. This issue tracks closing those gaps as part of the CRAN push (#31).

Gaps to close

  • summary.imugap_predict — added with the draws-compatible predict refactor (adjust predict to return a more-draws-compatible object #68 / PR change predict returns to be draws-compatible #70); no dedicated test. Cover the reduction/summary output shape and columns.
  • predict.imugap_fit edge cases — beyond the happy path: invalid loc_id / dose / age / cohort rejection, single-row vs. multi-row targets, the different create_target modes feeding predict.
  • checkers.R — the checked_* validators throw on bad input; assert the error paths (each stopper branch), not just the pass-through.
  • options.R (stan_options, imugap_options) — default construction + override + invalid-arg handling.
  • canonicalize_* — confirm the failure/validation branches are exercised, not just valid inputs.

Acceptance

  • summary.imugap_predict has tests
  • checker/validator error branches covered
  • options + canonicalize failure paths covered
  • predict edge cases covered

Refs #31

Metadata

Metadata

Labels

qualityAdditional unit, integration, or performance testingtestingQuality control work, such as linting, styling, or other static analysis

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions