Cygwin: mmap: allow remapping part of an existing anonymous mapping
[newlib-cygwin.git] / newlib / libm / test / test.h
blob48d3fcd38ffde70ba0810060911cb864281b1cbd
1 #define HAVE_FLOAT 1
2 #define X(x) (char *)x
4 #include <_ansi.h>
5 #include <math.h>
6 #include <float.h>
7 #include <ieeefp.h>
8 #include <stdio.h>
10 extern int inacc;
11 extern int redo;
12 extern int reduce;
13 extern int verbose;
15 void checkf();
16 void enter();
19 double translate_from();
21 typedef struct
23 long msw, lsw;
24 } question_struct_type;
27 typedef struct
29 char error_bit;
30 char errno_val;
31 char merror;
32 int line;
34 question_struct_type qs[3];
35 } one_line_type;
38 #define MVEC_START(x) one_line_type x[] = {
39 #define MVEC_END 0,};
42 int mag_of_error (double, double);
45 #define ERROR_PERFECT 20
46 #define ERROR_FAIL -1
48 #define AAAA 15
49 #define AAA 10
50 #define AA 6
51 #define A 5
52 #define B 3
53 #define C 1
54 #define VECOPEN(x,f) \
56 char buffer[100];\
57 sprintf(buffer,"%s_vec.c",x);\
58 f = fopen(buffer,"w");\
59 fprintf(f,"#include \"test.h\"\n");\
60 fprintf(f," one_line_type %s_vec[] = {\n", x);\
63 #define VECCLOSE(f,name,args)\
65 fprintf(f,"0,};\n"); \
66 fprintf(f,"test_%s(m) {run_vector_1(m,%s_vec,(char *)(%s),\"%s\",\"%s\"); } \n",\
67 name,\
68 name,name,name,args);\
69 fclose(f);\
74 typedef struct
76 int line;
78 char *string;
79 double value;
80 int endscan;
81 } double_type;
84 typedef struct {
85 long int value;
86 char end;
87 char errno_val;
88 } int_scan_type;
90 typedef struct
92 int line;
93 int_scan_type octal;
94 int_scan_type decimal;
95 int_scan_type hex;
96 int_scan_type normal;
97 int_scan_type alphabetical;
98 char *string;
99 } int_type;
102 typedef struct
104 int line;
105 double value;
106 char *estring;
107 int e1;
108 int e2;
109 int e3;
110 char *fstring;
111 int f1;
112 int f2;
113 int f3;
114 char *gstring;
115 int g1;
116 } ddouble_type;
118 typedef struct
120 int line;
121 double value;
122 char *result;
123 char *format_string;
124 } sprint_double_type;
127 typedef struct
129 int line;
130 int value;
131 char *result;
132 char *format_string;
133 } sprint_int_type;
136 void test_ieee (void);
137 void test_math2 (void);
138 void test_math (void);
139 void test_string (void);
140 void test_is (void);
141 void test_cvt (void);
143 void line (int);
145 void test_mok (double, double, int);
146 void test_iok (int, int);
147 void test_eok (int, int);
148 void test_sok (char *, char*);
149 void test_scok (char *, char*, int);
150 void newfunc (const char *);