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