89 std::cout <<
"\nTest 1- as std::vector<int>...";
90 std::vector<int> arr1 = {23, 10, 20, 11, 12, 6, 7};
91 sorting::pancake_sort::pancakeSort(arr1, size1);
92 assert(std::is_sorted(arr1.begin(), arr1.end()));
93 std::cout <<
"Passed\n";
94 for (
int i = 0; i < size1; i++) {
95 std::cout << arr1[i] <<
" ,";
97 std::cout << std::endl;
101 std::cout <<
"\nTest 2- as std::vector<double>...";
102 std::vector<double> arr2 = {23.56, 10.62, 200.78, 111.484,
103 3.9, 1.2, 61.77, 79.6};
104 sorting::pancake_sort::pancakeSort(arr2, size2);
105 assert(std::is_sorted(arr2.begin(), arr2.end()));
106 std::cout <<
"Passed\n";
107 for (
int i = 0; i < size2; i++) {
108 std::cout << arr2[i] <<
", ";
110 std::cout << std::endl;
114 std::cout <<
"\nTest 3- as std::vector<float>...";
115 std::vector<float> arr3 = {6.56, 12.62, 200.78, 768.484, 19.27, 68.87, 9.6};
116 sorting::pancake_sort::pancakeSort(arr3, size3);
117 assert(std::is_sorted(arr3.begin(), arr3.end()));
118 std::cout <<
"Passed\n";
119 for (
int i = 0; i < size3; i++) {
120 std::cout << arr3[i] <<
", ";
122 std::cout << std::endl;