2025-02-13 15:17:30 +01:00
|
|
|
/* ************************************************************************** */
|
|
|
|
|
/* */
|
|
|
|
|
/* ::: :::::::: */
|
|
|
|
|
/* testutil.c :+: :+: :+: */
|
|
|
|
|
/* +:+ +:+ +:+ */
|
|
|
|
|
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
|
|
|
|
/* +#+#+#+#+#+ +#+ */
|
|
|
|
|
/* Created: 2025/02/13 15:21:09 by khais #+# #+# */
|
2025-03-06 15:06:31 +01:00
|
|
|
/* Updated: 2025/03/06 15:30:52 by khais ### ########.fr */
|
2025-02-13 15:17:30 +01:00
|
|
|
/* */
|
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
|
|
|
|
|
#include "libft.h"
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
|
|
|
|
|
void assert_strequal(char *str1, char *str2)
|
|
|
|
|
{
|
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
|
|
ret = ft_strcmp(str1, str2);
|
2025-03-06 15:06:31 +01:00
|
|
|
ft_dprintf(STDERR_FILENO, "Expected\t[%s]\n", str1);
|
|
|
|
|
ft_dprintf(STDERR_FILENO, "to eq \t[%s]\n", str2);
|
2025-02-13 15:17:30 +01:00
|
|
|
assert(ret == 0);
|
|
|
|
|
}
|
2025-03-06 15:06:31 +01:00
|
|
|
|
|
|
|
|
extern void __lsan_do_leak_check(void)
|
|
|
|
|
__attribute__((weak));
|
|
|
|
|
|
|
|
|
|
void do_leak_check(void)
|
|
|
|
|
{
|
|
|
|
|
if (__lsan_do_leak_check != NULL)
|
|
|
|
|
__lsan_do_leak_check();
|
|
|
|
|
}
|