minishell/tests/testutil.c
Khaïs COLIN db0abe82cc
tests: also show debug info for succeeding assertions
This reminds us of all the good stuff we already acomplished!
2025-02-20 15:00:32 +01:00

23 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* testutil.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/13 15:21:09 by khais #+# #+# */
/* Updated: 2025/02/14 18:07:01 by khais ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
#include <assert.h>
void assert_strequal(char *str1, char *str2)
{
int ret;
ret = ft_strcmp(str1, str2);
ft_dprintf(STDERR_FILENO, "Expected '%s' to eq '%s'\n", str1, str2);
assert(ret == 0);
}