diff options
author | Stan Shebs <stanshebs@google.com> | 2018-01-19 09:22:56 -0800 |
---|---|---|
committer | Stan Shebs <stanshebs@google.com> | 2018-01-24 16:03:39 -0800 |
commit | 98e480caca6b95e46406fa13339ce6f06fb2ddd3 (patch) | |
tree | 096b2a4976365e05baf315c6f3997ee779c9b545 | |
parent | e363210bfab5138de567c4b3650de66307d715b5 (diff) | |
download | glibc-98e480caca6b95e46406fa13339ce6f06fb2ddd3.zip glibc-98e480caca6b95e46406fa13339ce6f06fb2ddd3.tar.gz glibc-98e480caca6b95e46406fa13339ce6f06fb2ddd3.tar.bz2 |
De-nest test-ffs.c
-rw-r--r-- | string/test-ffs.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/string/test-ffs.c b/string/test-ffs.c index e5e7579..d78d638 100644 --- a/string/test-ffs.c +++ b/string/test-ffs.c @@ -21,27 +21,26 @@ #include <stdio.h> #include <string.h> +int failures = 0; + +void +try (const char *name, long long int param, int value, int expected) +{ + if (value != expected) + { + printf ("%s(%#llx) expected %d got %d\n", + name, param, expected, value); + ++failures; + } + else + printf ("%s(%#llx) as expected %d\n", name, param, value); +} + int do_test (void) { - int failures = 0; int i; - auto void try (const char *name, long long int param, int value, - int expected); - - void try (const char *name, long long int param, int value, int expected) - { - if (value != expected) - { - printf ("%s(%#llx) expected %d got %d\n", - name, param, expected, value); - ++failures; - } - else - printf ("%s(%#llx) as expected %d\n", name, param, value); - } - #define TEST(fct, type) \ try (#fct, 0, fct ((type) 0), 0); \ for (i=0 ; i < 8 * sizeof (type); i++) \ |