libft_testing/ft_toupper_test.c
2025-10-04 11:39:29 +02:00

42 lines
1.4 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_toupper_test.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lalgarra <lalgarra@student.42madrid.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/10/03 18:27:44 by lalgarra #+# #+# */
/* Updated: 2025/10/04 11:38:26 by lalgarra ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
#include <stdio.h>
#include <limits.h>
int main(void)
{
int p1;
p1 = 0;
while (p1 < 256)
{
printf("'%c' (%i); ft_toupper(c): %i\r\n", p1, p1, ft_toupper(p1));
p1++;
}
p1 = -1;
printf("'%c' (%i); ft_toupper(c): %i\r\n", p1, p1, ft_toupper(p1));
p1 = INT_MIN;
while (p1 < INT_MIN + 3)
{
printf("'%c' (%i); ft_toupper(c): %i\r\n", p1, p1, ft_toupper(p1));
p1++;
}
p1 = INT_MAX;
while (p1 < INT_MAX - 3)
{
printf("'%c' (%i); ft_toupper(c): %i\r\n", p1, p1, ft_toupper(p1));
p1--;
}
return (0);
}