public void TestInsertStep_5() { int[] array = new int[] { 3, 2, 1, 5, 4 }; int[] expay = new int[] { 2, 1, 3, 4, 5 }; SortLevel.InsertSortSingle(array, 1, 0); for (int i = 0; i < array.Length; i++) { Assert.AreEqual(expay[i], array[i]); } }
public void TestInsertStep_2() { int[] array = new int[] { 2, 4, 1, 3, 7 }; int[] expay = new int[] { 2, 3, 1, 4, 7 }; SortLevel.InsertSortSingle(array, 2, 1); for (int i = 0; i < array.Length; i++) { Assert.AreEqual(expay[i], array[i]); } }
public void TestInsertStep_3() { int[] array = new int[] { 8, 4, 5, 11, 2, 1 }; int[] expay = new int[] { 5, 4, 2, 11, 8, 1 }; SortLevel.InsertSortSingle(array, 2, 0); for (int i = 0; i < array.Length; i++) { Assert.AreEqual(expay[i], array[i]); } }
public void TestInsertStep_1() { int[] array = new int[] { 0, 0, 1, 0, 0 }; int[] expay = new int[] { 0, 0, 0, 0, 1 }; SortLevel.InsertSortSingle(array, 1, 0); for (int i = 0; i < array.Length; i++) { Assert.AreEqual(expay[i], array[i]); } }