fix: patch a libunit bug
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: elagouch <elagouch@student.42lyon.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2026/01/24 15:32:32 by elagouch #+# #+# */
|
||||
/* Updated: 2026/01/24 16:17:20 by elagouch ### ########.fr */
|
||||
/* Updated: 2026/01/24 16:34:12 by elagouch ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -17,8 +17,9 @@ int strlen_launcher(void) {
|
||||
size_t res;
|
||||
|
||||
testlist = NULL;
|
||||
load_test(&testlist, "null test", &test_null);
|
||||
load_test(&testlist, "basic test", &test_basic);
|
||||
load_test(&testlist, "null", &test_null);
|
||||
load_test(&testlist, "basic", &test_basic);
|
||||
load_test(&testlist, "large", &test_large);
|
||||
|
||||
res = launch_tests(testlist, "strlen");
|
||||
clear_tests(&testlist);
|
||||
|
||||
25
real_tests/ft_strlen/03_large.c
Normal file
25
real_tests/ft_strlen/03_large.c
Normal file
@@ -0,0 +1,25 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* 03_large.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: elagouch <elagouch@student.42lyon.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2026/01/24 15:38:17 by elagouch #+# #+# */
|
||||
/* Updated: 2026/01/24 16:36:42 by elagouch ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "../tests.h"
|
||||
|
||||
int test_large(void) {
|
||||
size_t i;
|
||||
char s[10000];
|
||||
|
||||
i = 0;
|
||||
while (i < sizeof(s)) {
|
||||
s[i] = ' ';
|
||||
i++;
|
||||
}
|
||||
return (ft_strlen(s) == sizeof(s) + 1);
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
/* By: elagouch <elagouch@student.42lyon.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2026/01/24 15:32:30 by elagouch #+# #+# */
|
||||
/* Updated: 2026/01/24 16:16:13 by elagouch ### ########.fr */
|
||||
/* Updated: 2026/01/24 16:33:14 by elagouch ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -18,5 +18,6 @@
|
||||
// strlen
|
||||
int test_basic(void);
|
||||
int test_null(void);
|
||||
int test_large(void);
|
||||
|
||||
#endif // !TESTS_H
|
||||
|
||||
Reference in New Issue
Block a user