예제 #1
0
 private void SortTest(IRadixSorter radixSorter)
 {
     int[] a        = new int[] { 168, 781, 82, 639, 555, 78, 1954, 745, 369 };
     int[] expected = new int[] { 78, 82, 168, 369, 555, 639, 745, 781, 1954 };
     int[] result   = radixSorter.Sort(a);
     for (int i = 0; i < a.Length; i++)
     {
         Assert.AreEqual(expected[i], result[i]);
     }
 }
예제 #2
0
 private void NullInputTest(IRadixSorter radixSorter)
 {
     int[] a      = null;
     int[] result = radixSorter.Sort(a);
     Assert.AreEqual(null, result);
 }