From 196165e7924c882bd7b34049edc1ca797e2126ce Mon Sep 17 00:00:00 2001 From: Swastika Gupta <64654203+Swastyy@users.noreply.github.com> Date: Sun, 4 Jul 2021 17:49:49 +0530 Subject: [PATCH] Update wave_sort.cpp --- sorting/wave_sort.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sorting/wave_sort.cpp b/sorting/wave_sort.cpp index dac47b08d..20b496ecc 100644 --- a/sorting/wave_sort.cpp +++ b/sorting/wave_sort.cpp @@ -53,7 +53,7 @@ static void test() { std::cout << "Test 1... "; std::vector arr1 = sorting::wave_sort::waveSort(array1,7); const std::vector o1 = {2, 1, 10, 5, 49, 23, 90}; - assert(std::equal(arr1.begin(),arr1.end(),o1.begin(),o1.end())); + assert(arr1==o1); std::cout << "passed" << std::endl; // [1, 3, 4, 2, 7, 8] return [2, 1, 4, 3, 8, 7] @@ -61,7 +61,7 @@ static void test() { std::cout << "Test 2... "; std::vector arr2 = sorting::wave_sort::waveSort(array2,6); const std::vector o2 = {2, 1, 4, 3, 8, 7}; - assert(std::equal(arr2.begin(),arr2.end(),o2.begin(),o2.end())); + assert(arr2==o2); std::cout << "passed" << std::endl; // [3, 3, 3, 3] return [3, 3, 3, 3] @@ -69,7 +69,7 @@ static void test() { std::cout << "Test 3... "; std::vector arr3 = sorting::wave_sort::waveSort(array3,4); const std::vector o3 = {3, 3, 3, 3}; - assert(std::equal(arr3.begin(),arr3.end(),o3.begin(),o3.end())); + assert(arr3==o3); std::cout << "passed" << std::endl; // [9, 4, 6, 8, 14, 3] return [4, 3, 8, 6, 14, 9] @@ -77,7 +77,7 @@ static void test() { std::cout << "Test 4... "; std::vector arr4 = sorting::wave_sort::waveSort(array4,6); const std::vector o4 = {4, 3, 8, 6, 14, 9}; - assert(std::equal(arr4.begin(),arr4.end(),o4.begin(),o4.end())); + assert(arr4==o4); std::cout << "passed" << std::endl; }