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_string/ft_char/tests_isspace.c
Normal file
35
libft_personal/tests/ft_string/ft_char/tests_isspace.c
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* test_char_isspace.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: bgoulard <bgoulard@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/05/23 16:32:37 by bgoulard #+# #+# */
|
||||
/* Updated: 2024/05/23 21:25:51 by bgoulard ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "ft_char.h"
|
||||
|
||||
static int local_isspace(int c)
|
||||
{
|
||||
if (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t'
|
||||
|| c == '\v')
|
||||
return (1);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int test_ft_isspace(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
i = 0;
|
||||
while (i < 256)
|
||||
{
|
||||
if (ft_isspace(i) != local_isspace(i))
|
||||
return (1);
|
||||
i++;
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue