79 references to SimpleVersion
Microsoft.Build (1)
Utilities\SimpleVersion.cs (1)
125return new SimpleVersion(major, minor, build, revision);
Microsoft.Build.Engine.UnitTests (78)
Evaluation\SimpleVersion_Tests.cs (78)
27VerifyVersion(new SimpleVersion(major), major, 0, 0, 0); 36VerifyVersion(new SimpleVersion(major, minor), major, minor, 0, 0); 45VerifyVersion(new SimpleVersion(major, minor, build), major, minor, build, 0); 61VerifyVersion(new SimpleVersion(major, minor, build, revision), major, minor, build, revision); 67Assert.Throws<ArgumentOutOfRangeException>("major", () => new SimpleVersion(-1, 0)); 68Assert.Throws<ArgumentOutOfRangeException>("major", () => new SimpleVersion(-1, 0, 0)); 69Assert.Throws<ArgumentOutOfRangeException>("major", () => new SimpleVersion(-1, 0, 0, 0)); 75Assert.Throws<ArgumentOutOfRangeException>("minor", () => new SimpleVersion(0, -1)); 76Assert.Throws<ArgumentOutOfRangeException>("minor", () => new SimpleVersion(0, -1, 0)); 77Assert.Throws<ArgumentOutOfRangeException>("minor", () => new SimpleVersion(0, -1, 0, 0)); 83Assert.Throws<ArgumentOutOfRangeException>("build", () => new SimpleVersion(0, 0, -1)); 84Assert.Throws<ArgumentOutOfRangeException>("build", () => new SimpleVersion(0, 0, -1, 0)); 90Assert.Throws<ArgumentOutOfRangeException>("revision", () => new SimpleVersion(0, 0, 0, -1)); 97(new SimpleVersion(1, 2), new SimpleVersion(1, 2), 0), 98(new SimpleVersion(1, 2), new SimpleVersion(1, 3), -1), 99(new SimpleVersion(1, 2), new SimpleVersion(1, 1), 1), 100(new SimpleVersion(1, 2), new SimpleVersion(2, 0), -1), 101(new SimpleVersion(1, 2), new SimpleVersion(1, 2, 1), -1), 102(new SimpleVersion(1, 2), new SimpleVersion(1, 2, 0, 1), -1), 103(new SimpleVersion(1, 2), new SimpleVersion(1, 0), 1), 104(new SimpleVersion(1, 2), new SimpleVersion(1, 0, 1), 1), 105(new SimpleVersion(1, 2), new SimpleVersion(1, 0, 0, 1), 1), 107(new SimpleVersion(3, 2, 1), new SimpleVersion(2, 2, 1), 1), 108(new SimpleVersion(3, 2, 1), new SimpleVersion(3, 1, 1), 1), 109(new SimpleVersion(3, 2, 1), new SimpleVersion(3, 2, 0), 1), 111(new SimpleVersion(1, 2, 3, 4), new SimpleVersion(1, 2, 3, 4), 0), 112(new SimpleVersion(1, 2, 3, 4), new SimpleVersion(1, 2, 3, 5), -1), 113(new SimpleVersion(1, 2, 3, 4), new SimpleVersion(1, 2, 3, 3), 1) 170yield return new object[] { new SimpleVersion(2, 3), new SimpleVersion(2, 3), true }; 171yield return new object[] { new SimpleVersion(2, 3), new SimpleVersion(2, 4), false }; 172yield return new object[] { new SimpleVersion(2, 3), new SimpleVersion(3, 3), false }; 174yield return new object[] { new SimpleVersion(2, 3, 4), new SimpleVersion(2, 3, 4), true }; 175yield return new object[] { new SimpleVersion(2, 3, 4), new SimpleVersion(2, 3, 5), false }; 176yield return new object[] { new SimpleVersion(2, 3, 4), new SimpleVersion(2, 3), false }; 178yield return new object[] { new SimpleVersion(2, 3, 4, 5), new SimpleVersion(2, 3, 4, 5), true }; 179yield return new object[] { new SimpleVersion(2, 3, 4, 5), new SimpleVersion(2, 3, 4, 6), false }; 180yield return new object[] { new SimpleVersion(2, 3, 4, 5), new SimpleVersion(2, 3), false }; 181yield return new object[] { new SimpleVersion(2, 3, 4, 5), new SimpleVersion(2, 3, 4), false }; 183yield return new object[] { new SimpleVersion(2, 3, 0), new SimpleVersion(2, 3), true }; 184yield return new object[] { new SimpleVersion(2, 3, 4, 0), new SimpleVersion(2, 3, 4), true }; 186yield return new object[] { new SimpleVersion(2, 3, 4, 5), new TimeSpan(), false }; 187yield return new object[] { new SimpleVersion(2, 3, 4, 5), null, false }; 217yield return new object[] { $"{prefix}1{suffix}", new SimpleVersion(1) }; 218yield return new object[] { $"{prefix}1.2{suffix}", new SimpleVersion(1, 2) }; 219yield return new object[] { $"{prefix}1.2.3{suffix}", new SimpleVersion(1, 2, 3) }; 220yield return new object[] { $"{prefix}1.2.3.4{suffix}", new SimpleVersion(1, 2, 3, 4) }; 221yield return new object[] { $"{prefix}2147483647.2147483647.2147483647.2147483647{suffix}", new SimpleVersion(int.MaxValue, int.MaxValue, int.MaxValue, int.MaxValue) }; 285yield return new object[] { new SimpleVersion(1), "1.0.0.0" }; 286yield return new object[] { new SimpleVersion(1, 2), "1.2.0.0" }; 287yield return new object[] { new SimpleVersion(1, 2, 3), "1.2.3.0" }; 288yield return new object[] { new SimpleVersion(1, 2, 3, 4), "1.2.3.4" };