Fix WS
This commit is contained in:
parent
2d09f82f8a
commit
afb05e8157
|
@ -1,5 +1,5 @@
|
|||
/* Test and measure STRCHR functions.
|
||||
Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999, 2002, 2003, 2011 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
|
||||
Added wcschr support by Liubov Dmitrieva <liubov.dmitrieva@gmail.com>, 2011
|
||||
|
@ -115,7 +115,7 @@ do_test (size_t align, size_t pos, size_t len, int seek_char, int max_char)
|
|||
{
|
||||
buf[align + i] = 32 + 23 * i % max_char;
|
||||
if (buf[align + i] == seek_char)
|
||||
buf[align + i] = seek_char + 1;
|
||||
buf[align + i] = seek_char + 1;
|
||||
}
|
||||
buf[align + len] = 0;
|
||||
|
||||
|
@ -162,12 +162,12 @@ do_random_tests (void)
|
|||
|| (pos > len && (random () & 1)))
|
||||
len = pos + 1 + (random () & 7);
|
||||
if (len + align >= 512)
|
||||
len = 511 - align - (random () & 7);
|
||||
len = 511 - align - (random () & 7);
|
||||
if (pos == len && seek_char)
|
||||
len = pos + 1;
|
||||
j = (pos > len ? pos : len) + align + 64;
|
||||
if (j > 512)
|
||||
j = 512;
|
||||
j = 512;
|
||||
|
||||
for (i = 0; i < j; i++)
|
||||
{
|
||||
|
@ -200,7 +200,7 @@ do_random_tests (void)
|
|||
if (CALL (impl, (CHAR *) (p + align), seek_char) != result)
|
||||
{
|
||||
error (0, 0, "Iteration %zd - wrong result in function \
|
||||
%s (align in bytes: %zd, seek_char: %d, len: %zd, pos: %zd) %p != %p, p %p",
|
||||
%s (align in bytes: %zd, seek_char: %d, len: %zd, pos: %zd) %p != %p, p %p",
|
||||
n, impl->name, align * sizeof (CHAR), seek_char, len, pos,
|
||||
CALL (impl, (CHAR *) (p + align), seek_char), result, p);
|
||||
ret = 1;
|
||||
|
|
Loading…
Reference in New Issue