List the ATF_TC_() thins in the order of appearance.
This commit is contained in:
parent
48b4c06005
commit
aab71b6e06
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: t_strerror.c,v 1.1 2011/05/09 06:04:14 jruoho Exp $ */
|
||||
/* $NetBSD: t_strerror.c,v 1.2 2011/05/09 06:05:54 jruoho Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
@ -29,7 +29,7 @@
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_strerror.c,v 1.1 2011/05/09 06:04:14 jruoho Exp $");
|
||||
__RCSID("$NetBSD: t_strerror.c,v 1.2 2011/05/09 06:05:54 jruoho Exp $");
|
||||
|
||||
#include <atf-c.h>
|
||||
#include <errno.h>
|
||||
@ -43,6 +43,17 @@ ATF_TC_HEAD(strerror_basic, tc)
|
||||
atf_tc_set_md_var(tc, "descr", "A basic test of strerror(3)");
|
||||
}
|
||||
|
||||
ATF_TC_BODY(strerror_basic, tc)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 1; i < sys_nerr; i++)
|
||||
ATF_REQUIRE(strstr(strerror(i), "Unknown error:") == NULL);
|
||||
|
||||
for (; i < sys_nerr + 10; i++)
|
||||
ATF_REQUIRE(strstr(strerror(i), "Unknown error:") != NULL);
|
||||
}
|
||||
|
||||
ATF_TC(strerror_err);
|
||||
ATF_TC_HEAD(strerror_err, tc)
|
||||
{
|
||||
@ -63,17 +74,6 @@ ATF_TC_BODY(strerror_err, tc)
|
||||
ATF_REQUIRE(errno == EINVAL);
|
||||
}
|
||||
|
||||
ATF_TC_BODY(strerror_basic, tc)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 1; i < sys_nerr; i++)
|
||||
ATF_REQUIRE(strstr(strerror(i), "Unknown error:") == NULL);
|
||||
|
||||
for (; i < sys_nerr + 10; i++)
|
||||
ATF_REQUIRE(strstr(strerror(i), "Unknown error:") != NULL);
|
||||
}
|
||||
|
||||
ATF_TC(strerror_r_basic);
|
||||
ATF_TC_HEAD(strerror_r_basic, tc)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user