コード例 #1
0
 public void SelectionSort_Test_1()
 {
     int[] nums     = { 7, 6, 5, 4, 3, 2, 1 };
     int[] expected = { 1, 2, 3, 4, 5, 6, 7 };
     int[] actual   = sortAlgos.SelectionSort(nums);
     CollectionAssert.AreEqual(expected, actual);
 }
コード例 #2
0
 public void TestSelectionSort()
 {
     originalList = new List <int>(new int[] { 5, 4, 3, 1, 2 });
     SortAlgorithms.SelectionSort(originalList);
     CollectionAssert.AreEqual(sortedList, originalList);
 }