Module Name: src Committed By: jruoho Date: Thu Jul 7 11:12:18 UTC 2011
Modified Files: src/tests/lib/libc/stdlib: t_div.c t_hsearch.c t_mi_vector_hash.c t_posix_memalign.c Log Message: Rename some test case names. No functional change. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/stdlib/t_div.c \ src/tests/lib/libc/stdlib/t_hsearch.c \ src/tests/lib/libc/stdlib/t_posix_memalign.c cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/stdlib/t_mi_vector_hash.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/lib/libc/stdlib/t_div.c diff -u src/tests/lib/libc/stdlib/t_div.c:1.1 src/tests/lib/libc/stdlib/t_div.c:1.2 --- src/tests/lib/libc/stdlib/t_div.c:1.1 Thu Dec 23 15:27:44 2010 +++ src/tests/lib/libc/stdlib/t_div.c Thu Jul 7 11:12:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_div.c,v 1.1 2010/12/23 15:27:44 pgoyette Exp $ */ +/* $NetBSD: t_div.c,v 1.2 2011/07/07 11:12:18 jruoho Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -36,15 +36,14 @@ #define QUOT 1 #define REM 999236 -ATF_TC(div); - -ATF_TC_HEAD(div, tc) +ATF_TC(div_basic); +ATF_TC_HEAD(div_basic, tc) { atf_tc_set_md_var(tc, "descr", "Test div(3) for correctness"); } -ATF_TC_BODY(div, tc) +ATF_TC_BODY(div_basic, tc) { div_t d; @@ -54,15 +53,14 @@ ATF_CHECK(d.rem == REM); } -ATF_TC(ldiv); - -ATF_TC_HEAD(ldiv, tc) +ATF_TC(ldiv_basic); +ATF_TC_HEAD(ldiv_basic, tc) { atf_tc_set_md_var(tc, "descr", "Test ldiv(3) for correctness"); } -ATF_TC_BODY(ldiv, tc) +ATF_TC_BODY(ldiv_basic, tc) { ldiv_t ld; @@ -72,15 +70,14 @@ ATF_CHECK(ld.rem == REM); } -ATF_TC(lldiv); - -ATF_TC_HEAD(lldiv, tc) +ATF_TC(lldiv_basic); +ATF_TC_HEAD(lldiv_basic, tc) { atf_tc_set_md_var(tc, "descr", "Test lllldiv(3) for correctness"); } -ATF_TC_BODY(lldiv, tc) +ATF_TC_BODY(lldiv_basic, tc) { lldiv_t lld; @@ -93,9 +90,9 @@ ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, div); - ATF_TP_ADD_TC(tp, ldiv); - ATF_TP_ADD_TC(tp, lldiv); + ATF_TP_ADD_TC(tp, div_basic); + ATF_TP_ADD_TC(tp, ldiv_basic); + ATF_TP_ADD_TC(tp, lldiv_basic); return atf_no_error(); } Index: src/tests/lib/libc/stdlib/t_hsearch.c diff -u src/tests/lib/libc/stdlib/t_hsearch.c:1.1 src/tests/lib/libc/stdlib/t_hsearch.c:1.2 --- src/tests/lib/libc/stdlib/t_hsearch.c:1.1 Thu Jan 13 14:32:35 2011 +++ src/tests/lib/libc/stdlib/t_hsearch.c Thu Jul 7 11:12:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_hsearch.c,v 1.1 2011/01/13 14:32:35 pgoyette Exp $ */ +/* $NetBSD: t_hsearch.c,v 1.2 2011/07/07 11:12:18 jruoho Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ /* * Copyright (c) 2001 Christopher G. Demetriou * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -45,7 +45,7 @@ * information about NetBSD. * 4. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. @@ -56,14 +56,14 @@ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * <<Id: LICENSE,v 1.2 2000/06/14 15:57:33 cgd Exp>> */ #include <sys/cdefs.h> __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_hsearch.c,v 1.1 2011/01/13 14:32:35 pgoyette Exp $"); +__RCSID("$NetBSD: t_hsearch.c,v 1.2 2011/07/07 11:12:18 jruoho Exp $"); #include <errno.h> #include <search.h> @@ -74,15 +74,14 @@ #define REQUIRE_ERRNO(x) ATF_REQUIRE_MSG(x, "%s", strerror(errno)) -ATF_TC(basic); - -ATF_TC_HEAD(basic, tc) +ATF_TC(hsearch_basic); +ATF_TC_HEAD(hsearch_basic, tc) { atf_tc_set_md_var(tc, "descr", "Checks basic insertions and searching"); } -ATF_TC_BODY(basic, tc) +ATF_TC_BODY(hsearch_basic, tc) { ENTRY e, *ep; char ch[2]; @@ -124,16 +123,15 @@ hdestroy(); } -ATF_TC(duplicate); - -ATF_TC_HEAD(duplicate, tc) +ATF_TC(hsearch_duplicate); +ATF_TC_HEAD(hsearch_duplicate, tc) { atf_tc_set_md_var(tc, "descr", "Checks that inserting duplicate " "doesn't overwrite existing data"); } -ATF_TC_BODY(duplicate, tc) +ATF_TC_BODY(hsearch_duplicate, tc) { ENTRY e, *ep; @@ -161,16 +159,15 @@ hdestroy(); } -ATF_TC(nonexistent); - -ATF_TC_HEAD(nonexistent, tc) +ATF_TC(hsearch_nonexistent); +ATF_TC_HEAD(hsearch_nonexistent, tc) { atf_tc_set_md_var(tc, "descr", "Checks searching for non-existent entry"); } -ATF_TC_BODY(nonexistent, tc) +ATF_TC_BODY(hsearch_nonexistent, tc) { ENTRY e, *ep; @@ -183,16 +180,15 @@ hdestroy(); } -ATF_TC(two); - -ATF_TC_HEAD(two, tc) +ATF_TC(hsearch_two); +ATF_TC_HEAD(hsearch_two, tc) { atf_tc_set_md_var(tc, "descr", "Checks that searching doesn't overwrite previous search results"); } -ATF_TC_BODY(two, tc) +ATF_TC_BODY(hsearch_two, tc) { ENTRY e, *ep, *ep2; char *sa, *sb; @@ -215,7 +211,7 @@ e.data = (void*)(long)1; ep = hsearch(e, ENTER); - + ATF_REQUIRE(ep != NULL); ATF_REQUIRE_STREQ(ep->key, "b"); ATF_REQUIRE_EQ((long)ep->data, 1); @@ -233,17 +229,17 @@ ATF_REQUIRE(ep2 != NULL); ATF_REQUIRE_STREQ(ep2->key, "b"); ATF_REQUIRE_EQ((long)ep2->data, 1); - + hdestroy(); } ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, basic); - ATF_TP_ADD_TC(tp, duplicate); - ATF_TP_ADD_TC(tp, nonexistent); - ATF_TP_ADD_TC(tp, two); + ATF_TP_ADD_TC(tp, hsearch_basic); + ATF_TP_ADD_TC(tp, hsearch_duplicate); + ATF_TP_ADD_TC(tp, hsearch_nonexistent); + ATF_TP_ADD_TC(tp, hsearch_two); return atf_no_error(); } Index: src/tests/lib/libc/stdlib/t_posix_memalign.c diff -u src/tests/lib/libc/stdlib/t_posix_memalign.c:1.1 src/tests/lib/libc/stdlib/t_posix_memalign.c:1.2 --- src/tests/lib/libc/stdlib/t_posix_memalign.c:1.1 Sat Jan 1 23:56:49 2011 +++ src/tests/lib/libc/stdlib/t_posix_memalign.c Thu Jul 7 11:12:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_posix_memalign.c,v 1.1 2011/01/01 23:56:49 pgoyette Exp $ */ +/* $NetBSD: t_posix_memalign.c,v 1.2 2011/07/07 11:12:18 jruoho Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include <sys/cdefs.h> __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: t_posix_memalign.c,v 1.1 2011/01/01 23:56:49 pgoyette Exp $"); +__RCSID("$NetBSD: t_posix_memalign.c,v 1.2 2011/07/07 11:12:18 jruoho Exp $"); #include <atf-c.h> @@ -42,12 +42,12 @@ #include <stdlib.h> #include <string.h> -ATF_TC(posix_memalign); -ATF_TC_HEAD(posix_memalign, tc) +ATF_TC(posix_memalign_basic); +ATF_TC_HEAD(posix_memalign_basic, tc) { atf_tc_set_md_var(tc, "descr", "Checks posix_memalign(3)"); } -ATF_TC_BODY(posix_memalign, tc) +ATF_TC_BODY(posix_memalign_basic, tc) { size_t size[] = { 1, 2, 3, 4, 10, 100, 16384, 32768, 65536 @@ -82,7 +82,7 @@ ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, posix_memalign); + ATF_TP_ADD_TC(tp, posix_memalign_basic); return atf_no_error(); } Index: src/tests/lib/libc/stdlib/t_mi_vector_hash.c diff -u src/tests/lib/libc/stdlib/t_mi_vector_hash.c:1.2 src/tests/lib/libc/stdlib/t_mi_vector_hash.c:1.3 --- src/tests/lib/libc/stdlib/t_mi_vector_hash.c:1.2 Mon Jul 20 18:24:01 2009 +++ src/tests/lib/libc/stdlib/t_mi_vector_hash.c Thu Jul 7 11:12:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: t_mi_vector_hash.c,v 1.2 2009/07/20 18:24:01 joerg Exp $ */ +/* $NetBSD: t_mi_vector_hash.c,v 1.3 2011/07/07 11:12:18 jruoho Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. * All rights reserved. @@ -32,15 +32,14 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: t_mi_vector_hash.c,v 1.2 2009/07/20 18:24:01 joerg Exp $"); +__RCSID("$NetBSD: t_mi_vector_hash.c,v 1.3 2011/07/07 11:12:18 jruoho Exp $"); #include <atf-c.h> #include <stdlib.h> #include <string.h> -ATF_TC(t_mi_vector_hash); - -ATF_TC_HEAD(t_mi_vector_hash, tc) +ATF_TC(mi_vector_hash_basic); +ATF_TC_HEAD(mi_vector_hash_basic, tc) { atf_tc_set_md_var(tc, "descr", "Test mi_vector_hash_vector_hash for consistent results"); @@ -70,7 +69,7 @@ { "abcdefghijklmnop", { 0x2cf18103, 0x638c9268, 0xfa1ecf51 } }, }; -ATF_TC_BODY(t_mi_vector_hash, tc) +ATF_TC_BODY(mi_vector_hash_basic, tc) { size_t i, j, len; uint32_t hashes[3]; @@ -90,7 +89,7 @@ ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, t_mi_vector_hash); + ATF_TP_ADD_TC(tp, mi_vector_hash_basic); return atf_no_error(); }