aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2021-01-31 02:35:26 +0100
committerCharles Cabergs <me@cacharle.xyz>2021-01-31 02:35:26 +0100
commit64b7d55ed56c8696bc5580c6ca73e1ce4ebfab50 (patch)
tree071aca4286bd3d0166a59642325482997031e745 /test
parentb96b82194ccad2cddbb46b77aa1962a57c47ff44 (diff)
downloadlibft-64b7d55ed56c8696bc5580c6ca73e1ce4ebfab50.tar.gz
libft-64b7d55ed56c8696bc5580c6ca73e1ce4ebfab50.tar.bz2
libft-64b7d55ed56c8696bc5580c6ca73e1ce4ebfab50.zip
Removing heapsort tests
Diffstat (limited to 'test')
-rw-r--r--test/src/algo/test_ft_heapsort.c27
-rw-r--r--test/src/ht/test_ft_htget.c2
-rw-r--r--test/src/ht/test_ft_htnew.c4
-rw-r--r--test/src/main.c3
-rw-r--r--test/src/runner/test_runner_algo.c7
5 files changed, 4 insertions, 39 deletions
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));
-}
diff --git a/test/src/ht/test_ft_htget.c b/test/src/ht/test_ft_htget.c
index 4d4b4eb..cddec56 100644
--- a/test/src/ht/test_ft_htget.c
+++ b/test/src/ht/test_ft_htget.c
@@ -14,8 +14,6 @@ TEST_TEAR_DOWN(ft_htget)
/* ft_htdestroy_key(ht); */
}
-int helper_segfault_pid;
-
TEST(ft_htget, segfault)
{
TEST_ASSERT_SEGFAULT(ft_htget((t_ftht*)NULL, ""));
diff --git a/test/src/ht/test_ft_htnew.c b/test/src/ht/test_ft_htnew.c
index 17bca6a..901ed7c 100644
--- a/test/src/ht/test_ft_htnew.c
+++ b/test/src/ht/test_ft_htnew.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/12 22:30:06 by cacharle #+# #+# */
-/* Updated: 2020/02/28 12:15:32 by cacharle ### ########.fr */
+/* Updated: 2021/01/31 02:34:01 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -20,8 +20,6 @@ TEST_SETUP(ft_htnew)
TEST_TEAR_DOWN(ft_htnew)
{}
-int helper_segfault_pid;
-
TEST(ft_htnew, segfault)
{
TEST_ASSERT_SEGFAULT(ft_htnew(10));
diff --git a/test/src/main.c b/test/src/main.c
index 357e02e..75484de 100644
--- a/test/src/main.c
+++ b/test/src/main.c
@@ -1,5 +1,7 @@
#include "libft_test.h"
+int helper_segfault_pid;
+
static void run_all_test(void)
{
// ctype
@@ -47,7 +49,6 @@ static void run_all_test(void)
// algo
RUN_TEST_GROUP(ft_bsearch);
RUN_TEST_GROUP(ft_compar_int);
- RUN_TEST_GROUP(ft_heapsort);
RUN_TEST_GROUP(ft_is_set);
RUN_TEST_GROUP(ft_lfind);
RUN_TEST_GROUP(ft_lsearch);
diff --git a/test/src/runner/test_runner_algo.c b/test/src/runner/test_runner_algo.c
index f2afdb3..1888479 100644
--- a/test/src/runner/test_runner_algo.c
+++ b/test/src/runner/test_runner_algo.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/13 21:25:52 by cacharle #+# #+# */
-/* Updated: 2020/04/04 15:22:43 by charles ### ########.fr */
+/* Updated: 2021/01/31 02:32:42 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -23,11 +23,6 @@ TEST_GROUP_RUNNER(ft_compar_int)
RUN_TEST_CASE(ft_compar_int, basic);
}
-TEST_GROUP_RUNNER(ft_heapsort)
-{
- RUN_TEST_CASE(ft_heapsort, basic);
-}
-
TEST_GROUP_RUNNER(ft_is_set)
{
RUN_TEST_CASE(ft_is_set, basic);