Bring SemVer module to 100% coverage
DR
16h ago+349+349+012345678901234567890123456789-39-39-01234567890123456789
This gets src/core/semver/semver.cc to full coverage. It's split into two commits as discussed with Juan:
- Tests: adds edge-case tests to the existing
semver_from_test.cc,semver_compare_test.ccandsemver_parse_loose_test.cc - Removal: drops code that could never run. The two loops that always broke before their condition could fail (old lines 95 and 158) are now
while (true), the redundant checks in the else-if chain are gone, and the strict-mode dot checks now go throughcan_end_core_without_dot
Behavior is unchanged. All 400 semver tests pass and clang-format is clean.
Coverage for semver.cc:
| Metric | Before | Tests only | After removal |
|---|---|---|---|
| Functions | 100% | 100% | 100% |
| Lines | 98.09% | 98.09% | 100% |
| Branches | 92.11% | 95.79% | 100% |
| MC/DC | 85.42% | 91.67% | 100% |