Added null test functions for ft_strlcat and ft_strnstr to test func(NULL, "str, 0) case
( case 3 in the table below )
strlcat
strnstr
1
strlcat(NULL, "abc", 1);
crush
strnstr(NULL, "abc", 1);
2
strlcat("abc", NULL, 0);
crush
strnstr("abc", NULL, 0);
3
strlcat(NULL, "abc", 0);
must not crush
strnstr(NULL, "abc", 0);
Why
This is an edge case that students are likely to miss.
Since 2 NULL tests ( case 1 and 2 in the table above ) already exist on both functions, students tend to overlook the fact that there is another case to be met.
Notes
Thank you very much for your time and dedication to keep updating this test. I was once saved by this test, and I still appreciate and admire your motivation in creating this test!
128
What
ft_strlcat
andft_strnstr
to testfunc(NULL, "str, 0)
case ( case 3 in the table below )strlcat
strnstr
Why
Notes