public void OddEvenSort() { var algorithm = new OddEvenSort(); var sortedVector = algorithm.Sort(DataDefinition.UnsortedVector()); Assert.Equal(DataDefinition.SortedVector, sortedVector); }
public void OddEvenSortTest() { for (int i = 0; i < 100; i++) { int[] originData = Util.GenRandomIntArr(); int[] sortedData = (int[])originData.Clone(); Array.Sort(sortedData); OddEvenSort.Sort(originData); Assert.IsTrue(Util.CompareList(originData, sortedData)); } }