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 Adjust.
details: https://anonhg.NetBSD.org/src/rev/2aac6b3a4023
branches: trunk
changeset: 778592:2aac6b3a4023
user: jruoho <jruoho%NetBSD.org@localhost>
date: Fri Apr 06 07:53:10 2012 +0000
description:
Adjust.
diffstat:
tests/lib/libc/string/t_memchr.c | 16 +++++-----------
1 files changed, 5 insertions(+), 11 deletions(-)
diffs (37 lines):
diff -r a5ff73c20175 -r 2aac6b3a4023 tests/lib/libc/string/t_memchr.c
--- a/tests/lib/libc/string/t_memchr.c Fri Apr 06 06:15:13 2012 +0000
+++ b/tests/lib/libc/string/t_memchr.c Fri Apr 06 07:53:10 2012 +0000
@@ -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 <jtc%acorntoolworks.com@localhost>
@@ -169,7 +169,6 @@
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_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)
Home |
Main Index |
Thread Index |
Old Index