1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Add one more case

This commit is contained in:
Dan Balasescu 2024-08-16 18:21:06 +09:00
parent e0da476346
commit 7a47597234
No known key found for this signature in database

View File

@ -33,6 +33,7 @@ namespace osu.Game.Tests.Utils
Assert.That(BinarySearchUtils.BinarySearch(values, search, x => x, EqualitySelection.Rightmost), Is.EqualTo(expectedIndex));
}
[TestCase(new[] { 1, 1 }, 1, 0)]
[TestCase(new[] { 1, 2, 2 }, 2, 1)]
[TestCase(new[] { 1, 2, 2, 2 }, 2, 1)]
[TestCase(new[] { 1, 2, 2, 2, 3 }, 2, 2)]
@ -42,6 +43,7 @@ namespace osu.Game.Tests.Utils
Assert.That(BinarySearchUtils.BinarySearch(values, search, x => x), Is.EqualTo(expectedIndex));
}
[TestCase(new[] { 1, 1 }, 1, 0)]
[TestCase(new[] { 1, 2, 2 }, 2, 1)]
[TestCase(new[] { 1, 2, 2, 2 }, 2, 1)]
[TestCase(new[] { 1, 2, 2, 2, 3 }, 2, 1)]
@ -51,6 +53,7 @@ namespace osu.Game.Tests.Utils
Assert.That(BinarySearchUtils.BinarySearch(values, search, x => x, EqualitySelection.Leftmost), Is.EqualTo(expectedIndex));
}
[TestCase(new[] { 1, 1 }, 1, 1)]
[TestCase(new[] { 1, 2, 2 }, 2, 2)]
[TestCase(new[] { 1, 2, 2, 2 }, 2, 3)]
[TestCase(new[] { 1, 2, 2, 2, 3 }, 2, 3)]