removing the libft of rparodi
This commit is contained in:
parent
0391323626
commit
be6038dcc8
523 changed files with 724 additions and 3336 deletions
35
libft/tests/ft_pair/tests_pair_new.c
Normal file
35
libft/tests/ft_pair/tests_pair_new.c
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* tests_pair_new.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: bgoulard <bgoulard@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/07/06 16:14:03 by bgoulard #+# #+# */
|
||||
/* Updated: 2024/07/06 17:25:03 by bgoulard ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "ft_pair.h"
|
||||
#include "ft_pair_types.h"
|
||||
#include "tests/pair_tests.h"
|
||||
|
||||
int test_pair_new(void)
|
||||
{
|
||||
t_pair *pair;
|
||||
void *a;
|
||||
void *b;
|
||||
|
||||
a = (void *)0xDEADBEEF;
|
||||
b = (void *)0xDEADDEAD;
|
||||
pair = ft_pair_new(NULL, NULL);
|
||||
if (!pair)
|
||||
return (1);
|
||||
if (pair->first || pair->second)
|
||||
return (2);
|
||||
ft_pair_set(pair, a, b);
|
||||
if (pair->first != a || pair->second != b)
|
||||
return (3);
|
||||
ft_pair_destroy(&pair, NULL, NULL);
|
||||
return (0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue