De-nest test-ffs.c

This commit is contained in:
Stan Shebs 2018-01-19 09:22:56 -08:00
parent d01cba7dd1
commit 5a8bc50ed9

View File

@ -21,16 +21,10 @@
#include <stdio.h>
#include <string.h>
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)
void
try (const char *name, long long int param, int value, int expected)
{
if (value != expected)
{
@ -42,6 +36,11 @@ do_test (void)
printf ("%s(%#llx) as expected %d\n", name, param, value);
}
int
do_test (void)
{
int i;
#define TEST(fct, type) \
try (#fct, 0, fct ((type) 0), 0); \
for (i=0 ; i < 8 * sizeof (type); i++) \