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
35
libft_personal/tests/ft_pair/tests_pair_set.c
Normal file
35
libft_personal/tests/ft_pair/tests_pair_set.c
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* tests_pair_set.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: bgoulard <bgoulard@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/07/06 16:09:32 by bgoulard #+# #+# */
|
||||
/* Updated: 2024/07/06 16:46:25 by bgoulard ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "ft_pair.h"
|
||||
#include "ft_pair_types.h"
|
||||
#include "tests/pair_tests.h"
|
||||
|
||||
int test_pair_set(void)
|
||||
{
|
||||
t_pair pair;
|
||||
void *a;
|
||||
void *b;
|
||||
void *c;
|
||||
|
||||
a = (void *)0xDEADBEEF;
|
||||
b = (void *)0xDEADDEAD;
|
||||
c = (void *)0xDEADCAFE;
|
||||
ft_pair_set(&pair, a, b);
|
||||
if (pair.first != a || pair.second != b)
|
||||
return (1);
|
||||
ft_pair_set(&pair, c, a);
|
||||
if (pair.first != c || pair.second != a)
|
||||
return (1);
|
||||
ft_pair_set(NULL, a, b);
|
||||
return (0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue