libft/tests/bonus/lstnew/test2.c
2023-04-15 06:46:13 +02:00

31 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* :::::::: */
/* test2.c |o_o || | */
/* +:+ */
/* By: djonker <djonker@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2020/11/14 21:06:17 by djonker #+# #+# */
/* Updated: 2023/03/03 15:37:25 by houtworm \___)=(___/ */
/* */
/* ************************************************************************** */
#include "../../tmp/libft.h"
#include <stdio.h>
#include <string.h>
int main(void)
{
int r;
int *p;
t_list *list;
r = 0;
p = &r;
list = ft_lstnew(p);
if ((int *)list->content != p)
r = 1;
free (list);
return (r);
}