add bonus rule and start making ft_atoi_base

This commit is contained in:
2025-03-31 17:38:21 +02:00
parent 3b97b88f9b
commit d341aa9341
5 changed files with 102 additions and 9 deletions

19
test.c
View File

@ -6,7 +6,7 @@
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/03/29 19:53:58 by tomoron #+# #+# */
/* Updated: 2025/03/30 15:55:13 by tomoron ### ########.fr */
/* Updated: 2025/03/31 16:42:55 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -180,6 +180,21 @@ int test_strdup(void)
return(nb_tests == passed);
}
size_t check_base(char *base);
int tmp(void)
{
int nb_tests;
int passed;
nb_tests = 4;
passed = 0;
TEST("a", check_base("a") == 1);
TEST("a", check_base("abcdef") == 1);
return(nb_tests == passed);
}
int main(void)
{
FNC_TEST("ft_strlen", test_strlen());
@ -193,4 +208,6 @@ int main(void)
FNC_TEST("ft_read", test_read());
printf("\n\n");
FNC_TEST("ft_strdup", test_strdup());
printf("\n\n");
FNC_TEST("tmp", tmp());
}