removing the libft of rparodi
This commit is contained in:
parent
0391323626
commit
be6038dcc8
523 changed files with 724 additions and 3336 deletions
36
libft/tests/ft_string/ft_string/test_cmp_str.c
Normal file
36
libft/tests/ft_string/ft_string/test_cmp_str.c
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* test_cmp_str.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: bgoulard <bgoulard@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/05/25 17:34:36 by bgoulard #+# #+# */
|
||||
/* Updated: 2024/06/03 11:01:15 by bgoulard ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "ft_string.h"
|
||||
#include "ft_string_types.h"
|
||||
|
||||
int test_string_cmp_str(void)
|
||||
{
|
||||
t_string *str;
|
||||
t_string *str2;
|
||||
|
||||
str = ft_string_from("Hello");
|
||||
str2 = ft_string_from("Hello");
|
||||
if (ft_string_cmpstr(str, str2) != 0)
|
||||
return (1);
|
||||
ft_string_destroy(&str2);
|
||||
str2 = ft_string_from("Hello World");
|
||||
if (ft_string_cmpstr(str, str2) >= 0)
|
||||
return (2);
|
||||
ft_string_destroy(&str2);
|
||||
str2 = ft_string_from("Hell");
|
||||
if (ft_string_cmpstr(str, str2) <= 0)
|
||||
return (3);
|
||||
ft_string_destroy(&str);
|
||||
ft_string_destroy(&str2);
|
||||
return (0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue