aboutsummaryrefslogtreecommitdiff
path: root/test/src/mem/test_ft_calloc.c
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-09-18 16:39:52 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-09-18 16:39:52 +0200
commitdd0c485ac4975b7dd6d2e230213be1da50d0a065 (patch)
tree5fbd967f8b95c72fbb696bb089c2cc349d28b61f /test/src/mem/test_ft_calloc.c
parent3c3f1115f6e9a9b914e2dcbd796501ca7ce85342 (diff)
downloadlibft-malloc.tar.gz
libft-malloc.tar.bz2
libft-malloc.zip
Removing unnecessary stuffmalloc
Diffstat (limited to 'test/src/mem/test_ft_calloc.c')
-rw-r--r--test/src/mem/test_ft_calloc.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/test/src/mem/test_ft_calloc.c b/test/src/mem/test_ft_calloc.c
deleted file mode 100644
index 0df9b95..0000000
--- a/test/src/mem/test_ft_calloc.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "libft_test.h"
-
-TEST_GROUP(ft_calloc);
-
-TEST_SETUP(ft_calloc)
-{}
-
-TEST_TEAR_DOWN(ft_calloc)
-{}
-
-TEST(ft_calloc, basic)
-{
- char *ptr = NULL;
-
- ptr = ft_calloc(45, sizeof(char));
- TEST_ASSERT_NOT_NULL(ptr);
-#ifdef __APPLE__
- TEST_ASSERT_GREATER_THAN(45 * sizeof(char) - 1, malloc_size(ptr));
-#endif
- for (int i = 0; i < 45; i++)
- TEST_ASSERT_EQUAL(0x0, ptr[i]);
- /* free(ptr); */
-
- int *ptrint = NULL;
- ptrint = ft_calloc(10, sizeof(int));
- TEST_ASSERT_NOT_NULL(ptr);
-#ifdef __APPLE__
- TEST_ASSERT_GREATER_THAN(10 * sizeof(int) - 1, malloc_size(ptrint));
-#endif
- for (int i = 0; i < 10; i++)
- TEST_ASSERT_EQUAL(0x0, ptrint[i]);
- /* free(ptrint); */
-}