Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc/string List the ATF_TC_() thins in the order ...



details:   https://anonhg.NetBSD.org/src/rev/4b31a351964d
branches:  trunk
changeset: 764847:4b31a351964d
user:      jruoho <jruoho%NetBSD.org@localhost>
date:      Mon May 09 06:05:54 2011 +0000

description:
List the ATF_TC_() thins in the order of appearance.

diffstat:

 tests/lib/libc/string/t_strerror.c |  26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

diffs (54 lines):

diff -r 14283f37808a -r 4b31a351964d tests/lib/libc/string/t_strerror.c
--- a/tests/lib/libc/string/t_strerror.c        Mon May 09 06:04:14 2011 +0000
+++ b/tests/lib/libc/string/t_strerror.c        Mon May 09 06:05:54 2011 +0000
@@ -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_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_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)
 {



Home | Main Index | Thread Index | Old Index