public void TestInsertAll_10() { int[] array = new int[] { 0, 0, 1, 0, 0 }; int[] expay = new int[] { 0, 0, 1, 0, 0 }; SortLevel.InsertSortStep(array, 0, 0); for (int i = 0; i < array.Length; i++) { Assert.AreEqual(expay[i], array[i]); } }
public void TestInsertAll_4() { int[] array = new int[] { 9, 5, 7, 11, 3, 1, 6 }; int[] expay = new int[] { 3, 5, 6, 11, 7, 1, 9 }; SortLevel.InsertSortStep(array, 2, 0); for (int i = 0; i < array.Length; i++) { Assert.AreEqual(expay[i], array[i]); } }
public void TestInsertAll_7() { int[] array = new int[] { 4, 3, 2, -1 }; int[] expay = new int[] { -1, 3, 2, 4 }; SortLevel.InsertSortStep(array, 3, 0); for (int i = 0; i < array.Length; i++) { Assert.AreEqual(expay[i], array[i]); } }
public void TestInsertAll_2() { int[] array = new int[] { 6, 3, 5, 2, 8, 4, 1 }; int[] expay = new int[] { 1, 3, 5, 2, 8, 4, 6 }; SortLevel.InsertSortStep(array, 3, 0); for (int i = 0; i < array.Length; i++) { Assert.AreEqual(expay[i], array[i]); } }
public void TestInsertAll_9() { int[] array = new int[1]; int[] expay = new int[1]; SortLevel.InsertSortStep(array, 1, 0); for (int i = 0; i < array.Length; i++) { Assert.AreEqual(expay[i], array[i]); } Assert.AreEqual(0, expay[0]); Assert.AreEqual(0, array[0]); }