2021-10-24 08:02:33
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: <gbaconni@student.42lausanne.ch> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/10/23 16:09:04 by gbaconni #+# #+# */
|
||||
/* Updated: 2021/10/24 01:55:21 by gbaconni ### lausanne.ch */
|
||||
/* Updated: 2021/10/24 08:02:19 by gbaconni ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -370,6 +370,13 @@ static MunitResult test_ft_memcmp(const MunitParameter params[], void* user_data
|
||||
size_t n;
|
||||
|
||||
(void) user_data;
|
||||
#ifdef __GNU_LIBRARY__
|
||||
(void) user_data;
|
||||
(void) params;
|
||||
(void) s1;
|
||||
(void) s2;
|
||||
(void) n;
|
||||
#else
|
||||
s1 = (void *) munit_parameters_get(params, "s1");
|
||||
s2 = (void *) munit_parameters_get(params, "s2");
|
||||
n = strlen((char *) s1);
|
||||
@@ -382,6 +389,7 @@ static MunitResult test_ft_memcmp(const MunitParameter params[], void* user_data
|
||||
munit_assert_int(ft_memcmp(s1, s2, n), ==, memcmp(s1, s2, n));
|
||||
n = 0;
|
||||
munit_assert_int(ft_memcmp(s1, s2, n), ==, memcmp(s1, s2, n));
|
||||
#endif
|
||||
return (MUNIT_OK);
|
||||
}
|
||||
|
||||
@@ -544,10 +552,12 @@ static MunitResult test_ft_strnstr(const MunitParameter params[], void* user_dat
|
||||
munit_assert_string_equal(ft_str, str);
|
||||
munit_assert_memory_equal(n, ft_str, str);
|
||||
}
|
||||
#ifndef __GNU_LIBRARY__
|
||||
else
|
||||
{
|
||||
munit_assert_ptr_equal(ft_str, str);
|
||||
}
|
||||
#endif
|
||||
len--;
|
||||
}
|
||||
return (MUNIT_OK);
|
||||
|
||||
Reference in New Issue
Block a user