Skip to content

Commit

Permalink
Use CompareToOrdinal instead of string.Compare
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirwin committed Feb 24, 2024
1 parent 5867518 commit 1e00806
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Lucene.Net.Tests/Search/BaseTestRangeFilter.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using J2N.Text;
using Lucene.Net.Documents;
using Lucene.Net.Index.Extensions;
using NUnit.Framework;
Expand Down Expand Up @@ -198,7 +199,7 @@ public virtual void TestPad()
string bb = Pad(b);
string label = a + ":" + aa + " vs " + b + ":" + bb;
Assert.AreEqual(aa.Length, bb.Length, "i=" + i + ": length of " + label);
Assert.IsTrue(string.Compare(aa, bb, StringComparison.Ordinal) < 0, "i=" + i + ": compare less than " + label);
Assert.IsTrue(aa.CompareToOrdinal(bb) < 0, "i=" + i + ": compare less than " + label);
}
}
}
Expand Down

0 comments on commit 1e00806

Please sign in to comment.