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:
parent
e0da476346
commit
7a47597234
@ -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)]
|
||||
|
Loading…
Reference in New Issue
Block a user