feat(test/char): adding the unitary test for ft_tolower
- toupper now have the test
This commit is contained in:
parent
a7b156aaa6
commit
453b4d3b92
1 changed files with 36 additions and 0 deletions
36
test/char/test_toupper.c
Normal file
36
test/char/test_toupper.c
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* test_toupper.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/09/04 16:54:42 by rparodi #+# #+# */
|
||||
/* Updated: 2025/09/05 10:37:26 by rparodi ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "char.h"
|
||||
#include "color.h"
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
unsigned char c;
|
||||
|
||||
c = 0;
|
||||
while (c <= 128)
|
||||
{
|
||||
if (ft_toupper(c) != toupper(c))
|
||||
{
|
||||
printf("%s✘ Found %i, excepted %i%s\n", CLR_RED, ft_toupper(c),
|
||||
toupper(c), RESET);
|
||||
exit(1);
|
||||
}
|
||||
else
|
||||
printf("%s✔%s ", CLR_GREEN, RESET);
|
||||
c++;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue