style: norm

This commit is contained in:
airone01
2026-01-24 15:47:00 +01:00
parent 760c91c949
commit e8c88da02d
7 changed files with 34 additions and 21 deletions

View File

@@ -13,16 +13,15 @@
#include "../../util_unit.h"
#include "../tests.h"
int strlen_launcher(void) {
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);
}

View File

@@ -12,6 +12,7 @@
#include "libft.h"
int test_basic(void) {
int test_basic(void)
{
return (ft_strlen("hello, world") == 12);
}

View File

@@ -12,6 +12,7 @@
#include "libft.h"
int test_null(void) {
int test_null(void)
{
return (ft_strlen(NULL) == 0);
}

View File

@@ -1,3 +1,15 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* util_unit2.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: elagouch <elagouch@student.42lyon.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* 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