public void MSMergeSort_UnsortedArray_SortedArray() { int[] actual = { 3, 5, 8, 2, 4, 1, 6, 7 }; SortLib.QuickSort(actual); int[] expected = { 1, 2, 3, 4, 5, 6, 7, 8 }; CollectionAssert.Equals(expected, actual); }
public void NUNITMergeSort_UnsortedArray_SortedArray(int[] array, int[] expected) { SortLib.MergeSort(array); bool result = array.SequenceEqual <int>(expected); Assert.True(result); }
public void CsharpInsertSortTest() { var tmp = listToSort.ToArray(); SortLib.insert_sort(tmp); }
public void CsharpMergeSortTest() { var tmp = listToSort.ToArray(); SortLib.merge_sort(0, tmp.Length - 1, tmp); }
public void CsharpSelectSortTest() { var tmp = listToSort.ToArray(); SortLib.select_sort(tmp); }