public void TestSortFind_2() { int[] a = new int[] { 1 }; int s = SortLevel.SortFindMedian(a, 0, 0); Assert.AreEqual(1, s); }
public void TestSortFind_3() { int[] a = new int[] { 1, 2 }; int s = SortLevel.SortFindMedian(a, 0, 1); Assert.AreEqual(2, s); }
public void TestSortFind_1() { int[] a = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; int s = SortLevel.SortFindMedian(a, 0, 10); Assert.AreEqual(8, s); }
public void TestSortFind_4() { int[] a = new int[28]; for (int i = 0; i < a.Length; i++) { a[i] = 500 - i * 2; } int s = SortLevel.SortFindMedian(a, 0, 27); Assert.AreEqual(476, s); }