style: norm
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
int test_basic(void) {
|
||||
int test_basic(void)
|
||||
{
|
||||
return (ft_strlen("hello, world") == 12);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
int test_null(void) {
|
||||
int test_null(void)
|
||||
{
|
||||
return (ft_strlen(NULL) == 0);
|
||||
}
|
||||
|
||||
12
util_unit2.c
12
util_unit2.c
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user