Tabs to spaces.
[AROS.git] / test / cctest.c
blob7e1b6b1d011f5cf4bf83a8127129ef6f3c47f4ac
1 /*
2 Copyright © 1995-2014, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include <aros/debug.h>
8 #include <stdio.h>
9 #include <string.h>
11 static char s[256];
13 #define FPU_TEST 1
15 #if FPU_TEST
16 # define TYPE double
17 # define VAL1 1.0
18 # define VAL2 2.0
19 # define FORMAT_STRING "%f %f %f %f"
20 #else
21 # define TYPE long
22 # define VAL1 1
23 # define VAL2 2
24 # define FORMAT_STRING "%d %d %d %d"
25 #endif
27 void arrgh(TYPE a, TYPE b, TYPE shouldbe_a, TYPE shouldbe_b)
29 sprintf(s,"\n\n\n******* CONDITION CODES TERRIBLY WRONG ******* " FORMAT_STRING "\n\n\n", a, b, shouldbe_a, shouldbe_b);
30 bug(s);
33 int main(void)
35 TYPE a, b;
37 while((SetSignal(0, 0) & SIGBREAKF_CTRL_C) == 0)
39 a = VAL1; b = VAL1;
40 if (!(a == b)) arrgh(a,b,VAL1,VAL1);
41 a = VAL2; b = VAL1;
42 if (!(a > b)) arrgh(a,b,VAL2,VAL1);
43 if (!(b < a)) arrgh(a,b,VAL2,VAL1);
44 if (!(b != a)) arrgh(a,b,VAL2,VAL1);
45 if (a == b) arrgh(a,b,VAL2,VAL1);
46 if (a <= b) arrgh(a,b,VAL2,VAL1);
49 return 0;