alelievr / libft-unit-test

453 stars 88 forks source link

Remove all test about memccpy and test over long and min of ft_atoi #136

Closed MalwarePup closed 1 year ago

MalwarePup commented 1 year ago

1.The subject no longer asks us to code the memccpy function, so remove all tests and display.

First reported here by @ImOphen (#110).

2.Test about over long max and over long min is useless for our implementation of ft_atoi.

If we check the implementation of atoi by Apple, they use the function strtol for obtaining the result.

atoi(str)
    const char *str;
{
    return((int)strtol(str, (char **)NULL, 10));
}

The function strtol manages by default if we go over than long max or long min but in the prototype of ft_atoi, we can only return an int so this test is useless.

     int
     atoi(const char *str);

I have tested with a lot of ft_atoi of different libft of students and none manage these two cases.