improved optest testapp to test more cases, added an optest_float testapp
[libfirm] / ir / be / test / optest.c
1 #include <stdio.h>
2
3 #define tname(x) x##long
4 #define T long
5 #include "optest.h"
6
7 #undef tname
8 #undef T
9 #define tname(x) x##int
10 #define T int
11 #include "optest.h"
12
13 #undef tname
14 #undef T
15 #define tname(x) x##short
16 #define T short
17 #include "optest.h"
18
19 #undef tname
20 #undef T
21 #define tname(x) x##char
22 #define T char
23 #include "optest.h"
24
25 #undef tname
26 #undef T
27 #define tname(x) x##unsigned_long
28 #define T unsigned long
29 #include "optest.h"
30
31 #undef tname
32 #undef T
33 #define tname(x) x##unsigned_int
34 #define T unsigned int
35 #include "optest.h"
36
37 #undef tname
38 #undef T
39 #define tname(x) x##unsigned_short
40 #define T unsigned short
41 #include "optest.h"
42
43 #undef tname
44 #undef T
45 #define tname(x) x##unsigned_char
46 #define T unsigned char
47 #include "optest.h"
48
49 #if 0
50 #undef tname
51 #undef T
52 #define tname(x) x##unsigned_long_long
53 #define T unsigned long long
54 #include "optest.h"
55
56 #undef tname
57 #undef T
58 #define tname(x) x##long_long
59 #define T long long
60 #include "optest.h"
61 #endif
62
63 int main(int argc, char *argv[]) {
64         test_long();
65         test_int();
66         test_short();
67         test_char();
68         test_unsigned_long();
69         test_unsigned_int();
70         test_unsigned_short();
71         test_unsigned_char();
72 #if 0
73         test_unsigned_long_long();
74         test_long_long();
75 #endif
76         return 0;
77 }