added bgoulard lib + made lib sources in their own directory in build/ for readability
This commit is contained in:
parent
83cc8419a0
commit
0a390934d6
457 changed files with 21807 additions and 61 deletions
34
libft_personal/tests/ft_pair/tests_pair_destroy.c
Normal file
34
libft_personal/tests/ft_pair/tests_pair_destroy.c
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* tests_pair_destroy.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: bgoulard <bgoulard@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/07/06 17:09:25 by bgoulard #+# #+# */
|
||||
/* Updated: 2024/07/06 17:16:28 by bgoulard ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "ft_string.h"
|
||||
#include "tests/pair_tests.h"
|
||||
#include "ft_pair_types.h"
|
||||
#include "ft_pair.h"
|
||||
|
||||
int tests_pair_destroy(void)
|
||||
{
|
||||
t_pair *pair;
|
||||
|
||||
pair = ft_pair_new("key", "value");
|
||||
ft_pair_destroy(&pair, NULL, NULL);
|
||||
if (pair != NULL)
|
||||
return (1);
|
||||
pair = ft_pair_new(ft_strdup("key"), ft_strdup("value"));
|
||||
ft_pair_destroy(&pair, &free, &free);
|
||||
if (pair != NULL)
|
||||
return (2);
|
||||
ft_pair_destroy(NULL, NULL, NULL);
|
||||
pair = NULL;
|
||||
ft_pair_destroy(&pair, NULL, NULL);
|
||||
return (0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue