From 48d761f40e35a71ae83f3b158af0188eef897851 Mon Sep 17 00:00:00 2001 From: lalgarra Date: Sat, 4 Oct 2025 11:43:36 +0200 Subject: [PATCH] ft_tolower() --- Makefile | 4 ++-- ft_tolower_expected.output | Bin 0 -> 7909 bytes ft_tolower_test.c | 42 +++++++++++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 ft_tolower_expected.output create mode 100644 ft_tolower_test.c diff --git a/Makefile b/Makefile index 0c19f7c..35d1a44 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ # By: lalgarra +#+ +:+ +#+ # # +#+#+#+#+#+ +#+ # # Created: 2025/10/03 18:03:12 by lalgarra #+# #+# # -# Updated: 2025/10/04 11:31:13 by lalgarra ### ########.fr # +# Updated: 2025/10/04 11:40:48 by lalgarra ### ########.fr # # # # **************************************************************************** # @@ -17,7 +17,7 @@ LIBDIR = ../repo_libft_algarra CFLAGS += -Wall -Wextra -Werror -g3 -iquote $(LIBDIR) TESTS := ft_isalpha_test ft_isdigit_test ft_isalnum_test ft_isascii_test \ - ft_isprint_test ft_toupper_test + ft_isprint_test ft_toupper_test ft_tolower_test %_test : %_test.c $(CC) $(CFLAGS) $*_test.c -L$(LIBDIR) -lft -o $*_test diff --git a/ft_tolower_expected.output b/ft_tolower_expected.output new file mode 100644 index 0000000000000000000000000000000000000000..83838e220738a960b0b2b40e00649b59a3129453 GIT binary patch literal 7909 zcmZwMSJYiq8AjnGh-f4t0*Z(br6d8OXYbP!I#LyoUK9exM3hJ%1cP*?ca*Ah1e7Wk zuuue~t0*8{dJ#~hN-wT=o{PXZ^LEd3@$V;ljrDya<3@}dJH9bt^4RIKr_7!?W9FP` zv&K)IFllUK%;<3=OR9!bRnn-E>fuzEG*3y*;nXbY10}VFQ>&zTOKK0Nc1a&BsWY59 zCCyh-cQ|!R`cO%|;nXYX!zJ~HQ@^CqB~`*v#p5H11`?6^6NRLT$(TezsiN}HL}97o zvOuE1RFU~uqR>>a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yTNm0Q)4%HKG}AI^027AKsGgYgBQuB#%}Nu+0@t#UM8CwyTSj+ zrp9jY3fa`y4PGUi8oR-3WK&}|c%5u&>;`Wn+ip-E7PU9Yrp9jY7TMI;4c;c38oR+e zWK&}|c$aKy>;}mbUA4NcUbAEW3G$v;em?SjKNsq`KhM}Q>U}?#f4I3n IFGJA(0Sw(bQUCw| literal 0 HcmV?d00001 diff --git a/ft_tolower_test.c b/ft_tolower_test.c new file mode 100644 index 0000000..71995aa --- /dev/null +++ b/ft_tolower_test.c @@ -0,0 +1,42 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_tolower_test.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: lalgarra +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2025/10/03 18:27:44 by lalgarra #+# #+# */ +/* Updated: 2025/10/04 11:40:32 by lalgarra ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" +#include +#include + +int main(void) +{ + int p1; + + p1 = 0; + while (p1 < 256) + { + printf("'%c' (%i); ft_tolower(c): %i\r\n", p1, p1, ft_tolower(p1)); + p1++; + } + p1 = -1; + printf("'%c' (%i); ft_tolower(c): %i\r\n", p1, p1, ft_tolower(p1)); + p1 = INT_MIN; + while (p1 < INT_MIN + 3) + { + printf("'%c' (%i); ft_tolower(c): %i\r\n", p1, p1, ft_tolower(p1)); + p1++; + } + p1 = INT_MAX; + while (p1 < INT_MAX - 3) + { + printf("'%c' (%i); ft_tolower(c): %i\r\n", p1, p1, ft_tolower(p1)); + p1--; + } + return (0); +}