This repository has been archived on 2023-12-28. You can view files and clone it, but cannot push or open issues or pull requests.
c_piscine_rush_02/tests/test_ft_utils.c
2023-12-02 23:51:56 +04:00

44 lines
1.3 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* test_utils.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: achubuko <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/12/02 22:12:42 by achubuko #+# #+# */
/* Updated: 2023/12/02 23:51:18 by achubuko ### ########.fr */
/* */
/* ************************************************************************** */
#include "unity.h"
#include "ft_utils.h"
#include "string.h"
void setUp(void)
{
}
void tearDown(void)
{
}
void test_ft_strlen(void)
{
char *f;
f = "foobar baz\0test";
TEST_ASSERT_EQUAL_INT(strlen(f), ft_strlen(f));
}
void test_ft_atoui32_42(void)
{
TEST_ASSERT_EQUAL_UINT32(42, ft_atoui32("42"));
}
int main(void)
{
UNITY_BEGIN();
RUN_TEST(test_ft_strlen);
RUN_TEST(test_ft_atoui32_42);
return (UNITY_END());
}