1 |
149 |
jeremybenn |
/* Function definitions that are used by multiple tests. */
|
2 |
|
|
|
3 |
|
|
#define CHECKS(NAME,TYPEM) \
|
4 |
|
|
void checkS##NAME##1 (S##NAME##1 x, TYPEM y) \
|
5 |
|
|
{ if (x.a != y) DEBUG_CHECK } \
|
6 |
|
|
void checkS##NAME##2 (S##NAME##2 x, TYPEM y) \
|
7 |
|
|
{ if (x.a != y || x.b != y+1 ) DEBUG_CHECK } \
|
8 |
|
|
void checkS##NAME##3 (S##NAME##3 x, TYPEM y) \
|
9 |
|
|
{ if (x.a != y || x.b != y+1 || x.c != y+2 ) \
|
10 |
|
|
DEBUG_CHECK } \
|
11 |
|
|
void checkS##NAME##4 (S##NAME##4 x, TYPEM y) \
|
12 |
|
|
{ if (x.a != y || x.b != y+1 || x.c != y+2 || x.d != y+3) \
|
13 |
|
|
DEBUG_CHECK } \
|
14 |
|
|
void checkS##NAME##5 (S##NAME##5 x, TYPEM y) \
|
15 |
|
|
{ if (x.a != y || x.b != y+1 || x.c != y+2 || x.d != y+3 \
|
16 |
|
|
|| x.e != y+4) DEBUG_CHECK } \
|
17 |
|
|
void checkS##NAME##6 (S##NAME##6 x, TYPEM y) \
|
18 |
|
|
{ if (x.a != y || x.b != y+1 || x.c != y+2 || x.d != y+3 \
|
19 |
|
|
|| x.e != y+4 || x.f != y+5) DEBUG_CHECK } \
|
20 |
|
|
void checkS##NAME##7 (S##NAME##7 x, TYPEM y) \
|
21 |
|
|
{ if (x.a != y || x.b != y+1 || x.c != y+2 || x.d != y+3 \
|
22 |
|
|
|| x.e != y+4 || x.f != y+5 || x.g != y+6) \
|
23 |
|
|
DEBUG_CHECK } \
|
24 |
|
|
void checkS##NAME##8 (S##NAME##8 x, TYPEM y) \
|
25 |
|
|
{ if (x.a != y || x.b != y+1 || x.c != y+2 || x.d != y+3 \
|
26 |
|
|
|| x.e != y+4 || x.f != y+5 || x.g != y+6 \
|
27 |
|
|
|| x.h != y+7) DEBUG_CHECK } \
|
28 |
|
|
void checkS##NAME##9 (S##NAME##9 x, TYPEM y) \
|
29 |
|
|
{ if (x.a != y || x.b != y+1 || x.c != y+2 || x.d != y+3 \
|
30 |
|
|
|| x.e != y+4 || x.f != y+5 || x.g != y+6 \
|
31 |
|
|
|| x.h != y+7 || x.i != y+8) DEBUG_CHECK } \
|
32 |
|
|
void checkS##NAME##10 (S##NAME##10 x, TYPEM y) \
|
33 |
|
|
{ if (x.a != y || x.b != y+1 || x.c != y+2 || x.d != y+3 \
|
34 |
|
|
|| x.e != y+4 || x.f != y+5 || x.g != y+6 \
|
35 |
|
|
|| x.h != y+7 || x.i != y+8 || x.j != y+9) \
|
36 |
|
|
DEBUG_CHECK } \
|
37 |
|
|
void checkS##NAME##11 (S##NAME##11 x, TYPEM y) \
|
38 |
|
|
{ if (x.a != y || x.b != y+1 || x.c != y+2 || x.d != y+3 \
|
39 |
|
|
|| x.e != y+4 || x.f != y+5 || x.g != y+6 \
|
40 |
|
|
|| x.h != y+7 || x.i != y+8 || x.j != y+9 \
|
41 |
|
|
|| x.k != y+10) DEBUG_CHECK } \
|
42 |
|
|
void checkS##NAME##12 (S##NAME##12 x, TYPEM y) \
|
43 |
|
|
{ if (x.a != y || x.b != y+1 || x.c != y+2 || x.d != y+3 \
|
44 |
|
|
|| x.e != y+4 || x.f != y+5 || x.g != y+6 \
|
45 |
|
|
|| x.h != y+7 || x.i != y+8 || x.j != y+9 \
|
46 |
|
|
|| x.k != y+10 || x.l != y+11) DEBUG_CHECK } \
|
47 |
|
|
void checkS##NAME##13 (S##NAME##13 x, TYPEM y) \
|
48 |
|
|
{ if (x.a != y || x.b != y+1 || x.c != y+2 || x.d != y+3 \
|
49 |
|
|
|| x.e != y+4 || x.f != y+5 || x.g != y+6 \
|
50 |
|
|
|| x.h != y+7 || x.i != y+8 || x.j != y+9 \
|
51 |
|
|
|| x.k != y+10 || x.l != y+11 || x.m != y+12) \
|
52 |
|
|
DEBUG_CHECK } \
|
53 |
|
|
void checkS##NAME##14 (S##NAME##14 x, TYPEM y) \
|
54 |
|
|
{ if (x.a != y || x.b != y+1 || x.c != y+2 || x.d != y+3 \
|
55 |
|
|
|| x.e != y+4 || x.f != y+5 || x.g != y+6 \
|
56 |
|
|
|| x.h != y+7 || x.i != y+8 || x.j != y+9 \
|
57 |
|
|
|| x.k != y+10 || x.l != y+11 || x.m != y+12 \
|
58 |
|
|
|| x.n != y+13) DEBUG_CHECK } \
|
59 |
|
|
void checkS##NAME##15 (S##NAME##15 x, TYPEM y) \
|
60 |
|
|
{ if (x.a != y || x.b != y+1 || x.c != y+2 || x.d != y+3 \
|
61 |
|
|
|| x.e != y+4 || x.f != y+5 || x.g != y+6 \
|
62 |
|
|
|| x.h != y+7 || x.i != y+8 || x.j != y+9 \
|
63 |
|
|
|| x.k != y+10 || x.l != y+11 || x.m != y+12 \
|
64 |
|
|
|| x.n != y+13 || x.o != y+14) DEBUG_CHECK } \
|
65 |
|
|
void checkS##NAME##16 (S##NAME##16 x, TYPEM y) \
|
66 |
|
|
{ if (x.a != y || x.b != y+1 || x.c != y+2 || x.d != y+3 \
|
67 |
|
|
|| x.e != y+4 || x.f != y+5 || x.g != y+6 \
|
68 |
|
|
|| x.h != y+7 || x.i != y+8 || x.j != y+9 \
|
69 |
|
|
|| x.k != y+10 || x.l != y+11 || x.m != y+12 \
|
70 |
|
|
|| x.n != y+13 || x.o != y+14 || x.p != y+15) \
|
71 |
|
|
DEBUG_CHECK }
|