You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(validator): add optional constraints parameter to analyzeCoverage
Previously, analyzing a constrained test suite reported
constraint-impossible tuples as uncovered, making it impossible to
distinguish real coverage gaps from impossible combinations. Analyzing
the output of a constrained generate() call could never yield
coverageRatio === 1.0 even when coverage was complete.
When constraints are supplied to analyzeCoverage, tuples that violate
any constraint are excluded from the coverage universe entirely — they
do not appear in totalTuples, coveredTuples, or uncovered. This matches
ExcludeInvalidTuples semantics used in the generator, so a generated
test suite analyzed against the same model + constraints always reports
full coverage.
Changes:
- src/validator/coverage_validator.{h,cpp}: add optional constraints
vector to ValidateCoverage; exclude invalid tuples before scoring
- src/wasm/bindings.cpp: expose constraints arg in WASM binding
- js/types.ts: add constraints field to AnalyzeCoverageOptions
- js/index.ts, js/pure/index.ts: forward constraints through JS APIs
- src/ts/validator/coverage-validator.ts: pure TS validator updated
- docs/en/js-api.md, docs/ja/js-api.md, README.npm.md: document
the new parameter
Tests: 240 C++ (ctest) + 536 JS (vitest) all pass
Version: 1.0.2 → 1.1.0 (backwards-compatible addition)
|`cw.analyzeCoverage(params, tests, strength?)`| Measure t-wise coverage, list uncovered combinations |
92
+
|`cw.analyzeCoverage(params, tests, strength?, constraints?)`| Measure t-wise coverage, list uncovered combinations (constraint-excluded tuples are removed from the universe)|
93
93
|`cw.extendTests(existing, input)`| Add only the tests needed to close coverage gaps |
94
94
|`cw.generate(input)`| Generate minimal covering array from scratch |
95
95
|`cw.estimateModel(input)`| Preview model statistics |
0 commit comments