From a7b156aaa6071de31452dad5a50550f5d4622a47 Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 5 Sep 2025 10:49:07 +0200 Subject: [PATCH] feat(test/char): adding the unitary test for ft_tolower - tolower now have the test --- test/char/test_tolower.c | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 test/char/test_tolower.c diff --git a/test/char/test_tolower.c b/test/char/test_tolower.c new file mode 100644 index 0000000..73f05aa --- /dev/null +++ b/test/char/test_tolower.c @@ -0,0 +1,36 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* test_tolower.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rparodi +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2025/09/04 16:54:42 by rparodi #+# #+# */ +/* Updated: 2025/09/05 10:35:53 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_tolower(c) != tolower(c)) + { + printf("%s✘ Found %i, excepted %i%s\n", CLR_RED, ft_tolower(c), + tolower(c), RESET); + exit(1); + } + else + printf("%s✔%s ", CLR_GREEN, RESET); + c++; + } +}