Skip to content

Commit

Permalink
Fix warnings building tests and some failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adamreeve committed Oct 16, 2023
1 parent 7a506a9 commit 99467c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 21 deletions.
9 changes: 2 additions & 7 deletions test/SemanticVersioning.Tests/AdvancedRanges.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void TestTildeRanges(string range,
var comparatorB = new Comparator(
Comparator.Operator.LessThanExcludingPrereleases, Version.Parse(comparatorVersionB));
var comparators = Desugarer.TildeRange(range).Item2;
Assert.Equal(comparators.Count(), 2);
Assert.Equal(2, comparators.Count());
Assert.Contains(comparatorA, comparators);
Assert.Contains(comparatorB, comparators);
}
Expand All @@ -42,7 +42,7 @@ public void TestCaretRanges(string range, string comparatorVersionA, string comp
var comparatorB = new Comparator(
Comparator.Operator.LessThanExcludingPrereleases, Version.Parse(comparatorVersionB));
var comparators = Desugarer.CaretRange(range).Item2;
Assert.Equal(comparators.Count(), 2);
Assert.Equal(2, comparators.Count());
Assert.Contains(comparatorA, comparators);
Assert.Contains(comparatorB, comparators);
}
Expand Down Expand Up @@ -117,7 +117,6 @@ public void TestHyphenRanges(string range, string[] comparatorStrings)
[InlineData(">=*", "0.2.4")]
[InlineData("", "1.0.0")]
[InlineData("*", "1.2.3")]
[InlineData("*", "1.2.3")]
[InlineData(">=1.0.0", "1.0.0")]
[InlineData(">=1.0.0", "1.0.1")]
[InlineData(">=1.0.0", "1.1.0")]
Expand All @@ -139,7 +138,6 @@ public void TestHyphenRanges(string range, string[] comparatorStrings)
[InlineData("< 2.0.0", "1.9999.9999")]
[InlineData("<\t2.0.0", "0.2.9")]
[InlineData(">=0.1.97", "0.1.97")]
[InlineData(">=0.1.97", "0.1.97")]
[InlineData("0.1.20 || 1.2.4", "1.2.4")]
[InlineData(">=0.2.3 || <0.0.1", "0.0.0")]
[InlineData(">=0.2.3 || <0.0.1", "0.2.3")]
Expand All @@ -154,7 +152,6 @@ public void TestHyphenRanges(string range, string[] comparatorStrings)
[InlineData("1.2.*", "1.2.3")]
[InlineData("1.2.* || 2.*", "2.1.3")]
[InlineData("1.2.* || 2.*", "1.2.3")]
[InlineData("*", "1.2.3")]
[InlineData("2", "2.1.2")]
[InlineData("2.3", "2.3.1")]
[InlineData("~2.4", "2.4.0")] // >=2.4.0 <2.5.0
Expand All @@ -180,7 +177,6 @@ public void TestHyphenRanges(string range, string[] comparatorStrings)
[InlineData("~1.2.1 1.2.3", "1.2.3")]
[InlineData("~1.2.1 >=1.2.3 1.2.3", "1.2.3")]
[InlineData("~1.2.1 1.2.3 >=1.2.3", "1.2.3")]
[InlineData("~1.2.1 1.2.3", "1.2.3")]
[InlineData(">=1.2.1 1.2.3", "1.2.3")]
[InlineData("1.2.3 >=1.2.1", "1.2.3")]
[InlineData(">=1.2.3 >=1.2.1", "1.2.3")]
Expand Down Expand Up @@ -229,7 +225,6 @@ public void SatisfiedRanges(string rangeString, string versionString)
[InlineData("<2.0.0", "2.9999.9999", false)]
[InlineData("<2.0.0", "2.2.9", false)]
[InlineData(">=0.1.97", "0.1.93", false)]
[InlineData(">=0.1.97", "0.1.93", false)]
[InlineData("0.1.20 || 1.2.4", "1.2.3", false)]
[InlineData(">=0.2.3 || <0.0.1", "0.0.3", false)]
[InlineData(">=0.2.3 || <0.0.1", "0.2.2", false)]
Expand Down
2 changes: 1 addition & 1 deletion test/SemanticVersioning.Tests/NodeSemverTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public class NodeSemverTest
[InlineData("<= 2.0.0", "0.2.9")]
[InlineData("< 2.0.0", "1.9999.9999")]
[InlineData("<\t2.0.0", "0.2.9")]
[InlineData(">=0.1.97", "v0.1.97", true)]
[InlineData(">=0.1.97", "0.1.97", true)]
[InlineData(">=0.1.97", "0.1.97")]
[InlineData("0.1.20 || 1.2.4", "1.2.4")]
[InlineData(">=0.2.3 || <0.0.1", "0.0.0")]
Expand Down
14 changes: 1 addition & 13 deletions test/SemanticVersioning.Tests/VersionComparison.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,6 @@ public void CompareToDifferentType()
[InlineData("0.10.0", "0.9.0")]
[InlineData("0.99.0", "0.10.0")]
[InlineData("2.0.0", "1.2.3")]
[InlineData("0.0.0", "0.0.0-foo")]
[InlineData("0.0.1", "0.0.0")]
[InlineData("1.0.0", "0.9.9")]
[InlineData("0.10.0", "0.9.0")]
[InlineData("0.99.0", "0.10.0")]
[InlineData("2.0.0", "1.2.3")]
[InlineData("0.0.0", "0.0.0-foo")]
[InlineData("0.0.1", "0.0.0")]
[InlineData("1.0.0", "0.9.9")]
[InlineData("0.10.0", "0.9.0")]
[InlineData("0.99.0", "0.10.0")]
[InlineData("2.0.0", "1.2.3")]
[InlineData("1.2.3", "1.2.3-asdf")]
[InlineData("1.2.3", "1.2.3-4")]
[InlineData("1.2.3", "1.2.3-4-foo")]
Expand Down Expand Up @@ -209,7 +197,7 @@ public void Comparisons(string v0s, string v1s)
[InlineData("1.2.3-0", "=1.2.3-0", true)]
[InlineData("1.2.3-0", " 1.2.3-0", true)]
[InlineData("1.2.3-0", "= 1.2.3-0", true)]
[InlineData("1.2.3-0", " v1.2.3-0", false)]
[InlineData("1.2.3-0", " 1.2.3-0", false)]
[InlineData("1.2.3-0", " =1.2.3-0", true)]
[InlineData("1.2.3-0", " v 1.2.3-0", true)]
[InlineData("1.2.3-0", " = 1.2.3-0", true)]
Expand Down

0 comments on commit 99467c3

Please sign in to comment.