Mercurial > hg > octave-kai > gnulib-hg
diff tests/test-strchrnul.c @ 9998:3362dfd48604
Whitespace cleanup.
* tests/test-strchrnul.c: Reindent.
* lib/strchrnul.c: Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Mon, 28 Apr 2008 17:02:16 -0600 (2008-04-28) |
parents | 8e859c0b80c6 |
children | e45d9bb2233e |
line wrap: on
line diff
--- a/tests/test-strchrnul.c +++ b/tests/test-strchrnul.c @@ -25,13 +25,13 @@ #define ASSERT(expr) \ do \ { \ - if (!(expr)) \ - { \ - fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ - fflush (stderr); \ - abort (); \ - } \ - } \ + if (!(expr)) \ + { \ + fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \ + fflush (stderr); \ + abort (); \ + } \ + } \ while (0) int @@ -67,7 +67,7 @@ size_t repeat = 10000; for (; repeat > 0; repeat--) { - ASSERT (strchrnul (input, 'c') == input + 2); + ASSERT (strchrnul (input, 'c') == input + 2); } } @@ -76,15 +76,15 @@ int i, j; for (i = 0; i < 32; i++) { - for (j = 0; j < 256; j++) - input[i + j] = (j + 1) & 0xff; - for (j = 1; j < 256; j++) - { - ASSERT (strchrnul (input + i, j) == input + i + j - 1); - input[i + j - 1] = (j == 1 ? 2 : 1); - ASSERT (strchrnul (input + i, j) == input + i + 255); - input[i + j - 1] = j; - } + for (j = 0; j < 256; j++) + input[i + j] = (j + 1) & 0xff; + for (j = 1; j < 256; j++) + { + ASSERT (strchrnul (input + i, j) == input + i + j - 1); + input[i + j - 1] = (j == 1 ? 2 : 1); + ASSERT (strchrnul (input + i, j) == input + i + 255); + input[i + j - 1] = j; + } } }