Bring SemVer module to 100% coverage

DR
16h ago
+349-39

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.cc and semver_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 through can_end_core_without_dot

Behavior is unchanged. All 400 semver tests pass and clang-format is clean.

Coverage for semver.cc:

MetricBeforeTests onlyAfter removal
Functions100%100%100%
Lines98.09%98.09%100%
Branches92.11%95.79%100%
MC/DC85.42%91.67%100%