mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-24 14:41:06 +08:00
De-nest test-ffs.c
This commit is contained in:
parent
d01cba7dd1
commit
5a8bc50ed9
@ -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++) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user