FEAT: atoi and strncmp tests
This commit is contained in:
@@ -18,8 +18,9 @@ int strncmp_launcher(void)
|
||||
size_t res;
|
||||
|
||||
testlist = NULL;
|
||||
load_test(&testlist, "OK test", &strncmp_ok_test);
|
||||
load_test(&testlist, "KO test", &strncmp_ko_test);
|
||||
load_test(&testlist, "Basic test", &strncmp_basic_test);
|
||||
load_test(&testlist, "Len test", &strncmp_len_test);
|
||||
load_test(&testlist, "High len test", &strncmp_high_len_test);
|
||||
res = launch_tests(testlist, "ft_strncmp");
|
||||
clear_tests(&testlist);
|
||||
return (res);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "../tests.h"
|
||||
|
||||
int strncmp_ok_test(void)
|
||||
int strncmp_basic_test(void)
|
||||
{
|
||||
return (!ft_strncmp("test", "test", 4));
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "../tests.h"
|
||||
|
||||
int strncmp_ko_test(void)
|
||||
int strncmp_len_test(void)
|
||||
{
|
||||
return (!ft_strncmp("blabla", "test", 4));
|
||||
return (!ft_strncmp("test123", "test", 4));
|
||||
}
|
||||
18
real_tests/ft_strncmp/03_high_len.c
Normal file
18
real_tests/ft_strncmp/03_high_len.c
Normal file
@@ -0,0 +1,18 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* 03_high_len.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: dgaillet <dgaillet@student.42lyon.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2026/01/25 16:01:01 by dgaillet #+# #+# */
|
||||
/* Updated: 2026/01/25 16:01:03 by dgaillet ### ########lyon.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../tests.h"
|
||||
|
||||
int strncmp_high_len_test(void)
|
||||
{
|
||||
return (!ft_strncmp("test", "test", 42));
|
||||
}
|
||||
Reference in New Issue
Block a user