mirror of https://gitlab.com/basile.b/dexed.git
increase semVer max maj/min/patch values
This commit is contained in:
parent
eda6ec6e81
commit
7957c991d3
|
@ -15,7 +15,7 @@ type
|
||||||
TSemVer = record
|
TSemVer = record
|
||||||
strict private
|
strict private
|
||||||
fAdditional: string;
|
fAdditional: string;
|
||||||
fMajor, fMinor, fPatch: byte;
|
fMajor, fMinor, fPatch: word;
|
||||||
fValid: boolean;
|
fValid: boolean;
|
||||||
public
|
public
|
||||||
// Initializes with the semVer text.
|
// Initializes with the semVer text.
|
||||||
|
@ -32,17 +32,19 @@ type
|
||||||
function isRc: boolean;
|
function isRc: boolean;
|
||||||
|
|
||||||
// The major version.
|
// The major version.
|
||||||
property major: byte read fMajor;
|
property major: word read fMajor;
|
||||||
// The minor version.
|
// The minor version.
|
||||||
property minor: byte read fMinor;
|
property minor: word read fMinor;
|
||||||
// The patch.
|
// The patch.
|
||||||
property patch: byte read fPatch;
|
property patch: word read fPatch;
|
||||||
// The additional labels.
|
// The additional labels.
|
||||||
property additional: string read fAdditional;
|
property additional: string read fAdditional;
|
||||||
// Indicates if the init has succeeded.
|
// Indicates if the init has succeeded.
|
||||||
property valid: boolean read fValid;
|
property valid: boolean read fValid;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
PSemVer = ^TSemVer;
|
||||||
|
|
||||||
operator > (constref lhs, rhs: TSemVer): boolean;
|
operator > (constref lhs, rhs: TSemVer): boolean;
|
||||||
operator = (constref lhs, rhs: TSemVer): boolean;
|
operator = (constref lhs, rhs: TSemVer): boolean;
|
||||||
|
|
||||||
|
@ -165,6 +167,16 @@ begin
|
||||||
assert(v2.major = 1);
|
assert(v2.major = 1);
|
||||||
assert(v2.minor = 22);
|
assert(v2.minor = 22);
|
||||||
assert(v2.patch = 33);
|
assert(v2.patch = 33);
|
||||||
|
|
||||||
|
v1.init('v0.0.2060');
|
||||||
|
assert(v1.major = 0);
|
||||||
|
assert(v1.minor = 0);
|
||||||
|
assert(v1.patch = 2060);
|
||||||
|
|
||||||
|
v2 := v1;
|
||||||
|
assert(v2.major = 0);
|
||||||
|
assert(v2.minor = 0);
|
||||||
|
assert(v2.patch = 2060);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue