diff --git a/tests/ft_strlen/00_launcher.c b/tests/ft_strlen/00_launcher.c index 0155bdd..3b5be9b 100644 --- a/tests/ft_strlen/00_launcher.c +++ b/tests/ft_strlen/00_launcher.c @@ -13,16 +13,15 @@ #include "../../util_unit.h" #include "../tests.h" -int strlen_launcher(void) { - t_unit_test *testlist; - size_t res; +int strlen_launcher(void) +{ + t_unit_test *testlist; + size_t res; - testlist = NULL; - load_test(&testlist, "null test", &test_null); - load_test(&testlist, "basic test", &test_basic); - - res = launch_tests(testlist, "strlen"); - clear_tests(&testlist); - - return (res); + testlist = NULL; + load_test(&testlist, "null test", &test_null); + load_test(&testlist, "basic test", &test_basic); + res = launch_tests(testlist, "strlen"); + clear_tests(&testlist); + return (res); } diff --git a/tests/ft_strlen/01_basic_test.c b/tests/ft_strlen/01_basic_test.c index f9ffda6..9ffa4c5 100644 --- a/tests/ft_strlen/01_basic_test.c +++ b/tests/ft_strlen/01_basic_test.c @@ -12,6 +12,7 @@ #include "libft.h" -int test_basic(void) { - return (ft_strlen("hello, world") == 12); +int test_basic(void) +{ + return (ft_strlen("hello, world") == 12); } diff --git a/tests/ft_strlen/02_null_test.c b/tests/ft_strlen/02_null_test.c index 753154e..6af63d4 100644 --- a/tests/ft_strlen/02_null_test.c +++ b/tests/ft_strlen/02_null_test.c @@ -12,6 +12,7 @@ #include "libft.h" -int test_null(void) { - return (ft_strlen(NULL) == 0); +int test_null(void) +{ + return (ft_strlen(NULL) == 0); } diff --git a/tests/main.c b/tests/main.c index dc43521..d7e9509 100644 --- a/tests/main.c +++ b/tests/main.c @@ -12,7 +12,7 @@ #include "tests.h" -int main(void) +int main(void) { - strlen_launcher(); + strlen_launcher(); } diff --git a/tests/tests.h b/tests/tests.h index 4c20501..15fa308 100644 --- a/tests/tests.h +++ b/tests/tests.h @@ -14,10 +14,10 @@ # define TESTS_H // LAUNCHERS -int strlen_launcher(void); +int strlen_launcher(void); // strlen -int test_basic(void); -int test_null(void); +int test_basic(void); +int test_null(void); #endif // !TESTS_H diff --git a/util_unit.c b/util_unit.c index cf81cf8..3534581 100644 --- a/util_unit.c +++ b/util_unit.c @@ -90,5 +90,5 @@ void clear_tests(t_unit_test **head_ptr) head->func = NULL; head = next; } - *head_ptr = NULL; + *head_ptr = NULL; } diff --git a/util_unit2.c b/util_unit2.c index 50963e0..fc9b9b0 100644 --- a/util_unit2.c +++ b/util_unit2.c @@ -1,3 +1,15 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* util_unit2.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: elagouch +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2026/01/24 15:46:43 by elagouch #+# #+# */ +/* Updated: 2026/01/24 15:46:44 by elagouch ### ########.fr */ +/* */ +/* ************************************************************************** */ + #include "util_unit.h" /* we loop over instead of shifting the pointer to make sure we don't skip