unstack, sort: cleanup and improvement
[minix.git] / test / test45.c
blob66e04c55048e2d72dcdf400a9537f8fa42fff053
1 #include <errno.h>
2 #include <stdint.h>
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <unistd.h>
7 #if defined(__clang__)
8 #pragma clang diagnostic ignored "-Wtautological-compare"
9 #endif
11 #define MAX_ERROR 4
12 #include "common.c"
14 /* test strtol */
15 #define TYPE long
16 #define TYPEU unsigned long
17 #define TYPE_FUNC strtol
18 #include "test45.h"
19 #undef TYPE
20 #undef TYPEU
21 #undef TYPE_FUNC
23 /* test strtoul */
24 #define TYPE unsigned long
25 #define TYPEU unsigned long
26 #define TYPE_FUNC strtoul
27 #include "test45.h"
28 #undef TYPE
29 #undef TYPEU
30 #undef TYPE_FUNC
32 /* test strtoll */
33 #define TYPE long long
34 #define TYPEU unsigned long long
35 #define TYPE_FUNC strtoll
36 #include "test45.h"
37 #undef TYPE
38 #undef TYPEU
39 #undef TYPE_FUNC
41 /* test strtoull */
42 #define TYPE long long
43 #define TYPEU unsigned long long
44 #define TYPE_FUNC strtoull
45 #include "test45.h"
46 #undef TYPE
47 #undef TYPEU
48 #undef TYPE_FUNC
50 int main(int argc, char **argv)
52 start(45);
54 /* run long/unsigned long tests */
55 test_strtol();
56 test_strtoul();
58 /* run long long/unsigned long long tests */
59 test_strtoll();
60 test_strtoull();
62 quit();
63 return -1; /* never happens */