strlen.c (402B)
- #include <atf-c.h> // ATF*, atf*
- #include <stdio.h> // fopen, fclose, fputs
- #include <errno.h> // errno
- #include <string.h> // strerror
- ATF_TC(strlen_null);
- ATF_TC_HEAD(strlen_null, tc)
- {
- atf_tc_set_md_var(tc, "descr", "works with being passed NULL");
- }
- ATF_TC_BODY(strlen_null, tc)
- {
- ATF_CHECK(strlen(NULL) == 0);
- }
- ATF_TP_ADD_TCS(tp)
- {
- ATF_TP_ADD_TC(tp, strlen_null);
- return atf_no_error();
- }