add casts to zune macros to silence some warnings
[tangerine.git] / test / cctest.c
blob02ca717d71b60d50d19bf8f106559363380d59b2
1 #include <aros/debug.h>
3 #include <stdio.h>
4 #include <string.h>
6 static char s[256];
8 #define FPU_TEST 1
10 #if FPU_TEST
11 # define TYPE double
12 # define VAL1 1.0
13 # define VAL2 2.0
14 # define FORMAT_STRING "%f %f %f %f"
15 #else
16 # define TYPE long
17 # define VAL1 1
18 # define VAL2 2
19 # define FORMAT_STRING "%d %d %d %d"
20 #endif
22 void arrgh(TYPE a, TYPE b, TYPE shouldbe_a, TYPE shouldbe_b)
24 sprintf(s,"\n\n\n******* CONDITION CODES TERRIBLY WRONG ******* " FORMAT_STRING "\n\n\n", a, b, shouldbe_a, shouldbe_b);
25 bug(s);
28 int main(void)
30 TYPE a, b;
32 for(;;)
34 a = VAL1; b = VAL1;
35 if (!(a == b)) arrgh(a,b,VAL1,VAL1);
36 a = VAL2; b = VAL1;
37 if (!(a > b)) arrgh(a,b,VAL2,VAL1);
38 if (!(b < a)) arrgh(a,b,VAL2,VAL1);
39 if (!(b != a)) arrgh(a,b,VAL2,VAL1);
40 if (a == b) arrgh(a,b,VAL2,VAL1);
41 if (a <= b) arrgh(a,b,VAL2,VAL1);
44 return 0;