alelievr / libft-unit-test

455 stars 88 forks source link

strtrim test #63

Closed ghost closed 4 years ago

ghost commented 4 years ago

I think that the strtrim test functions are wrong as they seem to pass only 1 arg to ft_strtrim

char *s1 = "   \t  \n\n \t\t  \n\n\nHello \t  Please\n Trim me !";
char *s2 = "Hello \t  Please\n Trim me !";
char *ret = ft_strtrim(s1);

if (!strcmp(ret, s2))
    exit(TEST_SUCCESS);
    exit(TEST_FAILED);

The weird thing is:

char *ret = ft_strtrim(s1);

while the prototype is:

char *ft_strjoin(char const *s1, char const *s2);
ggjulio commented 4 years ago

@RedzTwist Normal this is for the old libft. It was only one argument. I'm working on a fork from him for our new libft. https://github.com/ggjulio/42cursus-libft-test

alelievr commented 4 years ago

It should be fixed on the latest master along with functions of part 1 and 2 but not yet bonuses