From 64b7d55ed56c8696bc5580c6ca73e1ce4ebfab50 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sun, 31 Jan 2021 02:35:26 +0100 Subject: Removing heapsort tests --- test/src/algo/test_ft_heapsort.c | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 test/src/algo/test_ft_heapsort.c (limited to 'test/src/algo/test_ft_heapsort.c') diff --git a/test/src/algo/test_ft_heapsort.c b/test/src/algo/test_ft_heapsort.c deleted file mode 100644 index 6c2c3fb..0000000 --- a/test/src/algo/test_ft_heapsort.c +++ /dev/null @@ -1,27 +0,0 @@ -#include "libft_test.h" - -TEST_GROUP(ft_heapsort); - -TEST_SETUP(ft_heapsort) -{} - -TEST_TEAR_DOWN(ft_heapsort) -{} - -static int compar(const void *a, const void *b) -{ - return *(int*)a - *(int*)b; -} - -TEST(ft_heapsort, basic) -{ - TEST_IGNORE(); - int arr[] = {3, 4, 1, 2, 7, 189, -1, -134, 7, 1, 34}; - int sorted_arr[sizeof(arr)]; - - memcpy(sorted_arr, arr, sizeof(arr)); - qsort(sorted_arr, sizeof(arr) / sizeof(int), sizeof(int), compar); - - ft_heapsort(arr, sizeof(arr) / sizeof(int), sizeof(int), compar); - TEST_ASSERT_EQUAL_INT_ARRAY(sorted_arr, arr, sizeof(arr) / sizeof(int)); -} -- cgit