semver/src/semver.tests
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Louis Seubert 95eb4f05a2 fix: make ==/Equals ignore build metadata for precedence
Previously SemanticVersion was a record struct whose ==/Equals/
GetHashCode were synthesized from all fields, so versions that
differ only in build metadata were not equal. Range matching
already used precedence (ignoring metadata), creating an
inconsistency.

Change the type to a plain readonly struct implementing
IEquatable<SemanticVersion> and define ==/Equals/GetHashCode
in terms of SemanticVersionComparer.Priority, so build
metadata is ignored. The custom ToString already existed, so no
display behaviour is lost.

Add a failing-then-passing test.
2026-07-11 23:02:43 +02:00
..
.editorconfig feat: add initial project setup 2026-05-21 21:45:36 +02:00
Geekeey.SemVer.Tests.csproj feat: add initial project setup 2026-05-21 21:45:36 +02:00
SemanticVersionComparerTests.cs feat: add initial project setup 2026-05-21 21:45:36 +02:00
SemanticVersionRangeTests.cs fix: avoid infinite recursion when formatting ranges as short npm 2026-07-11 23:01:59 +02:00
SemanticVersionTests.cs fix: make ==/Equals ignore build metadata for precedence 2026-07-11 23:02:43 +02:00