aboutsummaryrefslogtreecommitdiff
path: root/test/src/mem/test_ft_memcpy.c
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-10-11 14:53:20 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-10-11 14:53:20 +0200
commit39951f08a2938683d800c677c3a244e9ff8dbe19 (patch)
tree9321278f57c91d070e269fc2d2f95d4f2cb00fdf /test/src/mem/test_ft_memcpy.c
parent306a69eb9ae88813cf0be0aa3e001481e12220a1 (diff)
downloadlibft-39951f08a2938683d800c677c3a244e9ff8dbe19.tar.gz
libft-39951f08a2938683d800c677c3a244e9ff8dbe19.tar.bz2
libft-39951f08a2938683d800c677c3a244e9ff8dbe19.zip
Removing none c,h files for correction
Diffstat (limited to 'test/src/mem/test_ft_memcpy.c')
-rw-r--r--test/src/mem/test_ft_memcpy.c47
1 files changed, 0 insertions, 47 deletions
diff --git a/test/src/mem/test_ft_memcpy.c b/test/src/mem/test_ft_memcpy.c
deleted file mode 100644
index 3afe817..0000000
--- a/test/src/mem/test_ft_memcpy.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* ************************************************************************** */
-/* */
-/* ::: :::::::: */
-/* test_ft_memcpy.c :+: :+: :+: */
-/* +:+ +:+ +:+ */
-/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
-/* +#+#+#+#+#+ +#+ */
-/* Created: 2020/02/13 03:33:22 by cacharle #+# #+# */
-/* Updated: 2020/02/13 04:27:55 by cacharle ### ########.fr */
-/* */
-/* ************************************************************************** */
-
-#include "libft_test.h"
-
-TEST_GROUP(ft_memcpy);
-
-TEST_SETUP(ft_memcpy)
-{}
-
-TEST_TEAR_DOWN(ft_memcpy)
-{}
-
-TEST(ft_memcpy, basic)
-{
- void *ptr;
- unsigned char buf1[32] = {0};
- unsigned char buf2[32] = "bonjour";
-
- ptr = ft_memcpy(buf1, buf2, 32);
- TEST_ASSERT_NOT_NULL(ptr);
- TEST_ASSERT_EQUAL_PTR(buf1, ptr);
- TEST_ASSERT_EQUAL(0, memcmp(buf1, buf2, 32));
-
- ptr = ft_memcpy(buf1, "yo", 3);
- TEST_ASSERT_NOT_NULL(ptr);
- TEST_ASSERT_EQUAL_PTR(buf1, ptr);
- TEST_ASSERT_EQUAL(0, memcmp(buf1, "yo", 3));
- TEST_ASSERT_EQUAL(0, memcmp(buf1 + 3, buf2 + 3, 32 - 3));
-
- char saved[32];
-
- memcpy(saved, buf2, 32);
- ptr = ft_memcpy(buf2, "", 0);
- TEST_ASSERT_NOT_NULL(ptr);
- TEST_ASSERT_EQUAL_PTR(buf2, ptr);
- TEST_ASSERT_EQUAL(0, memcmp(buf2, saved, 32));
-}