From aab71b6e0634fac7362967880d56b15fce7280e4 Mon Sep 17 00:00:00 2001 From: jruoho Date: Mon, 9 May 2011 06:05:54 +0000 Subject: [PATCH] List the ATF_TC_() thins in the order of appearance. --- tests/lib/libc/string/t_strerror.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/lib/libc/string/t_strerror.c b/tests/lib/libc/string/t_strerror.c index b0ba54dc43ac..2aff55428066 100644 --- a/tests/lib/libc/string/t_strerror.c +++ b/tests/lib/libc/string/t_strerror.c @@ -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 -__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 #include @@ -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) {