mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
35 lines
1.3 KiB
C
35 lines
1.3 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* testutil.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2025/02/13 15:21:09 by khais #+# #+# */
|
|
/* Updated: 2025/03/11 11:46:04 by khais ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "libft.h"
|
|
#include <assert.h>
|
|
|
|
void assert_strequal(char *str1, char *str2)
|
|
{
|
|
int ret;
|
|
|
|
ft_dprintf(STDERR_FILENO, "Expected\t[%s]\n", str1);
|
|
ft_dprintf(STDERR_FILENO, "to eq \t[%s]\n", str2);
|
|
if (str1 == str2)
|
|
return ;
|
|
ret = ft_strcmp(str1, str2);
|
|
assert(ret == 0);
|
|
}
|
|
|
|
extern void __lsan_do_leak_check(void)
|
|
__attribute__((weak));
|
|
|
|
void do_leak_check(void)
|
|
{
|
|
if (__lsan_do_leak_check != NULL)
|
|
__lsan_do_leak_check();
|
|
}
|