ft_toupper()
This commit is contained in:
parent
7230528198
commit
98c6d82eff
3 changed files with 44 additions and 2 deletions
4
Makefile
4
Makefile
|
|
@ -6,7 +6,7 @@
|
|||
# By: lalgarra <lalgarra@student.42madrid.com> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2025/10/03 18:03:12 by lalgarra #+# #+# #
|
||||
# Updated: 2025/10/03 21:16:37 by lalgarra ### ########.fr #
|
||||
# Updated: 2025/10/04 11:31:13 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_isprint_test ft_toupper_test
|
||||
|
||||
%_test : %_test.c
|
||||
$(CC) $(CFLAGS) $*_test.c -L$(LIBDIR) -lft -o $*_test
|
||||
|
|
|
|||
BIN
ft_toupper_expected.output
Normal file
BIN
ft_toupper_expected.output
Normal file
Binary file not shown.
42
ft_toupper_test.c
Normal file
42
ft_toupper_test.c
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* 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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue