Module Name: src Committed By: jruoho Date: Fri Apr 6 07:53:11 UTC 2012
Modified Files: src/tests/lib/libc/string: t_memchr.c Log Message: Adjust. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/string/t_memchr.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/string/t_memchr.c diff -u src/tests/lib/libc/string/t_memchr.c:1.2 src/tests/lib/libc/string/t_memchr.c:1.3 --- src/tests/lib/libc/string/t_memchr.c:1.2 Thu Jul 14 05:46:04 2011 +++ src/tests/lib/libc/string/t_memchr.c Fri Apr 6 07:53:10 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: t_memchr.c,v 1.2 2011/07/14 05:46:04 jruoho Exp $ */ +/* $NetBSD: t_memchr.c,v 1.3 2012/04/06 07:53:10 jruoho Exp $ */ /* * Written by J.T. Conklin <j...@acorntoolworks.com> @@ -169,7 +169,6 @@ ATF_TC_HEAD(memrchr_simple, tc) ATF_TC_BODY(memrchr_simple, tc) { char buf[] = "abcdabcd"; - short i = 8; ATF_CHECK(memrchr(buf, 'a', 0) == NULL); ATF_CHECK(memrchr(buf, 'g', 0) == NULL); @@ -178,15 +177,10 @@ ATF_TC_BODY(memrchr_simple, tc) ATF_CHECK(memrchr("\0", 'x', 0) == NULL); ATF_CHECK(memrchr("\0", 'x', 1) == NULL); - while (i <= 16) { - - ATF_CHECK(memrchr(buf, 'a', i) == buf + 4); - ATF_CHECK(memrchr(buf, 'b', i) == buf + 5); - ATF_CHECK(memrchr(buf, 'c', i) == buf + 6); - ATF_CHECK(memrchr(buf, 'd', i) == buf + 7); - - i *= 2; - } + ATF_CHECK(memrchr(buf, 'a', 8) == buf + 4); + ATF_CHECK(memrchr(buf, 'b', 8) == buf + 5); + ATF_CHECK(memrchr(buf, 'c', 8) == buf + 6); + ATF_CHECK(memrchr(buf, 'd', 8) == buf + 7); } ATF_TP_ADD_TCS(tp)