-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_isdigit_test.c
25 lines (23 loc) · 1.35 KB
/
ft_isdigit_test.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_isdigit_test.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: abenamar <abenamar@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/11/11 16:12:52 by abenamar #+# #+# */
/* Updated: 2022/12/28 21:01:12 by abenamar ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft_test.h"
void ft_isdigit_test(void)
{
printf(RESET "\nft_isdigit\t");
ft_assert(1, ft_isdigit('0') != 0 && isdigit('0') != 0);
ft_assert(2, ft_isdigit('9') != 0 && isdigit('9') != 0);
ft_assert(3, ft_isdigit('5') != 0 && isdigit('5') != 0);
ft_assert(4, ft_isdigit(-1) == 0 && isdigit(-1) == 0);
ft_assert(5, ft_isdigit('x') == 0 && isdigit('x') == 0);
ft_assert(6, ft_isdigit(216) == 0 && isdigit(216) == 0);
ft_assert(7, ft_isdigit(' ') == 0 && isdigit(' ') == 0);
}