Cub3D/libft/tests/ft_vector/tests_vec_destroy.c
2024-11-08 19:37:30 +01:00

34 lines
1.2 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* tests_vec_destroy.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: bgoulard <bgoulard@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/24 11:20:58 by bgoulard #+# #+# */
/* Updated: 2024/05/24 11:20:59 by bgoulard ### ########.fr */
/* */
/* ************************************************************************** */
#include "ft_vector.h"
#include "ft_vector_types.h"
int test_vec_destroy(void)
{
t_vector *vec;
int a;
int b;
int c;
a = 0;
b = 1;
c = 2;
vec = ft_vec_new();
ft_vec_add(&vec, &a);
ft_vec_add(&vec, &b);
ft_vec_add(&vec, &c);
ft_vec_destroy(&vec);
if (vec)
return (1);
return (0);
}