Skip to content

Commit

Permalink
New Version ">", ">=" operators (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo authored Feb 28, 2024
1 parent 2f23fc5 commit cc2148c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/semantic_versioning.ads
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ package Semantic_Versioning with Preelaborate is
function "=" (L, R : Version) return Boolean;
-- Conforming to Semver spec, the build metadata is not included in the comparison.

function ">" (L, R : Version) return Boolean
is (not (L < R or else L = R));

function "<=" (L, R : Version) return Boolean
is (not (L > R));

function ">=" (L, R : Version) return Boolean
is (not (L < R));

function Major (V : Version) return Point;
function Minor (V : Version) return Point;
function Patch (V : Version) return Point;
Expand Down

0 comments on commit cc2148c

Please sign in to comment.