diff options
Diffstat (limited to 'string')
-rw-r--r-- | string/test-strchr.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/string/test-strchr.c b/string/test-strchr.c index 5b6022746c..6c8ca54a7d 100644 --- a/string/test-strchr.c +++ b/string/test-strchr.c @@ -130,7 +130,7 @@ do_test (size_t align, size_t pos, size_t len, int seek_char, int max_char) size_t i; CHAR *result; CHAR *buf = (CHAR *) buf1; - align &= 15; + align &= 127; if ((align + len) * sizeof (CHAR) >= page_size) return; @@ -261,10 +261,22 @@ test_main (void) for (i = 1; i < 8; ++i) { + do_test (0, 16 << i, 4096, SMALL_CHAR, MIDDLE_CHAR); + do_test (i, 16 << i, 4096, SMALL_CHAR, MIDDLE_CHAR); + } + + for (i = 1; i < 8; ++i) + { do_test (i, 64, 256, SMALL_CHAR, MIDDLE_CHAR); do_test (i, 64, 256, SMALL_CHAR, BIG_CHAR); } + for (i = 0; i < 8; ++i) + { + do_test (16 * i, 256, 512, SMALL_CHAR, MIDDLE_CHAR); + do_test (16 * i, 256, 512, SMALL_CHAR, BIG_CHAR); + } + for (i = 0; i < 32; ++i) { do_test (0, i, i + 1, SMALL_CHAR, MIDDLE_CHAR); @@ -279,10 +291,22 @@ test_main (void) for (i = 1; i < 8; ++i) { + do_test (0, 16 << i, 4096, 0, MIDDLE_CHAR); + do_test (i, 16 << i, 4096, 0, MIDDLE_CHAR); + } + + for (i = 1; i < 8; ++i) + { do_test (i, 64, 256, 0, MIDDLE_CHAR); do_test (i, 64, 256, 0, BIG_CHAR); } + for (i = 0; i < 8; ++i) + { + do_test (16 * i, 256, 512, 0, MIDDLE_CHAR); + do_test (16 * i, 256, 512, 0, BIG_CHAR); + } + for (i = 0; i < 32; ++i) { do_test (0, i, i + 1, 0, MIDDLE_CHAR); |