removing the libft of rparodi
This commit is contained in:
parent
0391323626
commit
be6038dcc8
523 changed files with 724 additions and 3336 deletions
35
libft/tests/ft_string/ft_str/test_strcmp.c
Normal file
35
libft/tests/ft_string/ft_str/test_strcmp.c
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* test_strcmp.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: bgoulard <bgoulard@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/05/26 11:12:10 by bgoulard #+# #+# */
|
||||
/* Updated: 2024/05/26 14:17:14 by bgoulard ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "ft_string.h"
|
||||
|
||||
int test_strcmp(void)
|
||||
{
|
||||
const char *buffs[] = {
|
||||
"none",
|
||||
"some",
|
||||
"nonethensome",
|
||||
"nonethensome",
|
||||
"!\0a",
|
||||
"!\0b",
|
||||
};
|
||||
|
||||
if (ft_strcmp(buffs[0], buffs[1]) >= 0)
|
||||
return (1);
|
||||
if (ft_strcmp(buffs[0], buffs[2]) >= 0)
|
||||
return (2);
|
||||
if (ft_strcmp(buffs[2], buffs[3]) != 0)
|
||||
return (3);
|
||||
if (ft_strcmp(buffs[4], buffs[5]) != 0)
|
||||
return (4);
|
||||
return (0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue