diff options
author | Stan Shebs <stanshebs@google.com> | 2018-01-19 09:22:56 -0800 |
---|---|---|
committer | Stan Shebs <stanshebs@google.com> | 2018-01-19 09:22:56 -0800 |
commit | 5a8bc50ed92a5eeb1a382e55cc873e3ecbbdffc0 (patch) | |
tree | 1875d7c8aaa89ec49e53b40223f7e523a55e99f5 | |
parent | d01cba7dd1930c6dcf721c5087db93ac4c740181 (diff) | |
download | glibc-5a8bc50ed92a5eeb1a382e55cc873e3ecbbdffc0.zip glibc-5a8bc50ed92a5eeb1a382e55cc873e3ecbbdffc0.tar.gz glibc-5a8bc50ed92a5eeb1a382e55cc873e3ecbbdffc0.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++) \ |