Пример #1
0
 public void Sorting_SipleArray_Success()
 {
     int[] actual   = { 1 };
     int[] expected = { 1 };
     Sortings.QuickSorting(actual);
     CollectionAssert.AreEqual(actual, expected);
 }
Пример #2
0
 public void Sorting_Array_By_QuickSort_Success()
 {
     int[] actual   = new int[] { 5, 8, -1, 4, 6, -2, 9, 7, 1, -3, 3, 2, 0 };
     int[] expected = new int[] { -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
     Sortings.QuickSorting(actual);
     CollectionAssert.AreEqual(actual, expected);
 }
Пример #3
0
        public void Sorting_Array_By_Quicksort_In_Huge_Size()
        {
            Random rnd = new Random();

            int[] actual   = new int[10000000];
            int[] expected = actual;
            for (int i = 0; i < actual.Length; i++)
            {
                actual[i] = rnd.Next();
            }
            Sortings.QuickSorting(actual);
            CollectionAssert.AreEqual(actual, expected);
        }