public void TestTripleNotFound() { Assert.AreEqual(-1, BinarySearch.Chop(0, _arrayOfThree)); Assert.AreEqual(-1, BinarySearch.Chop(2, _arrayOfThree)); Assert.AreEqual(-1, BinarySearch.Chop(4, _arrayOfThree)); Assert.AreEqual(-1, BinarySearch.Chop(6, _arrayOfThree)); }
public void TestQuadripleNotFound() { Assert.AreEqual(-1, BinarySearch.Chop(0, _arrayOfFour)); Assert.AreEqual(-1, BinarySearch.Chop(2, _arrayOfFour)); Assert.AreEqual(-1, BinarySearch.Chop(4, _arrayOfFour)); Assert.AreEqual(-1, BinarySearch.Chop(6, _arrayOfFour)); Assert.AreEqual(-1, BinarySearch.Chop(8, _arrayOfFour)); }
public void TestQuadripleFindFourth() { Assert.AreEqual(3, BinarySearch.Chop(7, _arrayOfFour)); }
public void TestQuadripleFindThird() { Assert.AreEqual(2, BinarySearch.Chop(5, _arrayOfFour)); }
public void TestQuadripleFindSecond() { Assert.AreEqual(1, BinarySearch.Chop(3, _arrayOfFour)); }
public void TestQuadripleFindFirst() { Assert.AreEqual(0, BinarySearch.Chop(1, _arrayOfFour)); }
public void TestTripleThird() { Assert.AreEqual(2, BinarySearch.Chop(5, _arrayOfThree)); }
public void TestTripleSecond() { Assert.AreEqual(1, BinarySearch.Chop(3, _arrayOfThree)); }
public void TestTripleFirst() { Assert.AreEqual(0, BinarySearch.Chop(1, _arrayOfThree)); }
public void TestSingle() { Assert.AreEqual(-1, BinarySearch.Chop(3, _arrayOfOne)); Assert.AreEqual(0, BinarySearch.Chop(1, _arrayOfOne)); }
public void TestEmpty() { Assert.AreEqual(-1, BinarySearch.Chop(3, _arrayEmpty)); }
public void TestEmpty() { Assert.Equals(-1, _binarySearch.Chop(3, new int[] { })); }