From 453b4d3b92c5b532b0d696de26614f0c306ee5a3 Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 5 Sep 2025 10:49:19 +0200 Subject: [PATCH] feat(test/char): adding the unitary test for ft_tolower - toupper now have the test --- test/char/test_toupper.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 test/char/test_toupper.c diff --git a/test/char/test_toupper.c b/test/char/test_toupper.c new file mode 100644 index 0000000..b2b1d61 --- /dev/null +++ b/test/char/test_toupper.c @@ -0,0 +1,36 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* test_toupper.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rparodi +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* 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 +#include +#include + +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++; + } +}