Definition at line 12 of file ApplicationVersionTests.cs.
◆ TestApplicationVersionFeatures()
void BGC.Tests.ApplicationVersionTests.TestApplicationVersionFeatures |
( |
| ) |
|
|
inline |
Definition at line 18 of file ApplicationVersionTests.cs.
References BGC.Utility.ApplicationVersion.Build, BGC.Utility.ApplicationVersion.Major, BGC.Utility.ApplicationVersion.Minor, BGC.Utility.ApplicationVersion.Revision, and BGC.Utility.ApplicationVersion.ToString().
33 Assert.IsTrue(greaterThan(
"1.0.1",
"0.999.123"));
34 Assert.IsFalse(greaterThan(
"9.99.999",
"9.100.9999"));
35 Assert.IsTrue(greaterThan(
"10.0.0.1",
"10"));
37 Assert.IsFalse(greaterThan(
"123.456.7890",
"123.456.7890"));
42 Assert.IsTrue(greaterOrEq(
"1.0.1",
"0.999.123"));
43 Assert.IsFalse(greaterOrEq(
"9.99.999",
"9.100.9999"));
44 Assert.IsTrue(greaterOrEq(
"10.0.0.1",
"10"));
46 Assert.IsTrue(greaterOrEq(
"123.456.7890",
"123.456.7890"));
51 Assert.IsFalse(lessThan(
"1.0.1",
"0.999.123"));
52 Assert.IsTrue(lessThan(
"9.99.999",
"9.100.9999"));
53 Assert.IsTrue(lessThan(
"10",
"10.0.0.1"));
55 Assert.IsFalse(lessThan(
"44.536.0",
"44.536"));
60 Assert.IsFalse(lessOrEq(
"1.0.1",
"0.999.123"));
61 Assert.IsTrue(lessOrEq(
"9.99.999",
"9.100.9999"));
62 Assert.IsTrue(lessOrEq(
"10",
"10.0.0.1"));
64 Assert.IsTrue(lessOrEq(
"44.536.0",
"44.536"));
69 Assert.IsFalse(equal(
"1.0.1",
"0.999.123"));
70 Assert.IsFalse(equal(
"9.99.999",
"9.100.9999"));
71 Assert.IsFalse(equal(
"10",
"10.0.0.1"));
73 Assert.IsTrue(equal(
"44.536.0",
"44.536"));
78 Assert.IsTrue(notEqual(
"1.0.1",
"0.999.123"));
79 Assert.IsTrue(notEqual(
"9.99.999",
"9.100.9999"));
80 Assert.IsTrue(notEqual(
"10.0.0.1",
"10"));
82 Assert.IsFalse(notEqual(
"123.456.7890",
"123.456.7890"));
87 Assert.IsFalse(isNull(
"1"));
88 Assert.IsFalse(isNull(
"9999.9999.9999.9999"));
89 Assert.IsFalse(isNull(
"3.2.1.1"));
90 Assert.IsTrue(isNull(
"0"));
91 Assert.IsTrue(isNull(
"0.0.0.0"));
95 string[] unparsableAttempts =
new string[]
98 "asdf.asdfas.gasdfga.*",
102 string[] truncatingAttempts =
new string[] {
"0.0.0.0.9" };
105 foreach (
string version
in unparsableAttempts)
107 UnityEngine.TestTools.LogAssert.Expect(LogType.Error, $
"Failed to parse version string: {version}");
108 Assert.IsTrue(isNull(version));
112 foreach (
string version
in truncatingAttempts)
114 UnityEngine.TestTools.LogAssert.Expect(LogType.Error, $
"ApplicationVersion constructed by string with more than 4 fields: \"{version}\"");
115 Assert.IsTrue(isNull(version));
130 Assert.IsTrue(testVer.
Major == 10);
131 Assert.IsTrue(testVer.
Minor == 0);
132 Assert.IsTrue(testVer.
Build == 1);
133 Assert.IsTrue(testVer.
Revision == 0);
135 Assert.IsTrue(testVer.
ToString() ==
"10.0.1");
override string ToString()
delegate bool VersionUnitary(in ApplicationVersion value)
Sequence-based versioning parsing, managing, and comparing
delegate bool VersionComparison(in ApplicationVersion lhs, in ApplicationVersion rhs)
◆ VersionComparison()
◆ VersionUnitary()
delegate bool BGC.Tests.ApplicationVersionTests.VersionUnitary |
( |
in ApplicationVersion |
value | ) |
|
|
private |
The documentation for this class was generated from the following file: