Added script front-end for primer-design code
[htsworkflow.git] / htswanalysis / MACS / lib / gsl / gsl-1.11 / block / test.c
1 /* block/test.c
2  * 
3  * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough
4  * 
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3 of the License, or (at
8  * your option) any later version.
9  * 
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License for more details.
14  * 
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  */
19
20 #include <config.h>
21 #include <fcntl.h>
22 #include <stdlib.h>
23 #include <stdio.h>
24 #include <gsl/gsl_block.h>
25 #include <gsl/gsl_ieee_utils.h>
26 #include <gsl/gsl_test.h>
27
28 int status = 0;
29
30 #ifndef DESC
31 #define DESC ""
32 #endif
33
34 #define N 1027
35
36
37 #define BASE_GSL_COMPLEX_LONG
38 #include "templates_on.h"
39 #include "test_complex_source.c"
40 #if HAVE_PRINTF_LONGDOUBLE
41 #include "test_complex_io.c"
42 #endif
43 #include "templates_off.h"
44 #undef  BASE_GSL_COMPLEX_LONG
45
46
47 #define BASE_GSL_COMPLEX
48 #include "templates_on.h"
49 #include "test_complex_source.c"
50 #include "test_complex_io.c"
51 #include "templates_off.h"
52 #undef  BASE_GSL_COMPLEX
53
54 #define BASE_GSL_COMPLEX_FLOAT
55 #include "templates_on.h"
56 #include "test_complex_source.c"
57 #include "test_complex_io.c"
58 #include "templates_off.h"
59 #undef  BASE_GSL_COMPLEX_FLOAT
60
61 #define BASE_LONG_DOUBLE
62 #include "templates_on.h"
63 #include "test_source.c"
64 #if HAVE_PRINTF_LONGDOUBLE
65 #include "test_io.c"
66 #endif
67 #include "templates_off.h"
68 #undef  BASE_LONG_DOUBLE
69
70 #define BASE_DOUBLE
71 #include "templates_on.h"
72 #include "test_source.c"
73 #include "test_io.c"
74 #include "templates_off.h"
75 #undef  BASE_DOUBLE
76
77 #define BASE_FLOAT
78 #include "templates_on.h"
79 #include "test_source.c"
80 #include "test_io.c"
81 #include "templates_off.h"
82 #undef  BASE_FLOAT
83
84 #define BASE_ULONG
85 #include "templates_on.h"
86 #include "test_source.c"
87 #include "test_io.c"
88 #include "templates_off.h"
89 #undef  BASE_ULONG
90
91 #define BASE_LONG
92 #include "templates_on.h"
93 #include "test_source.c"
94 #include "test_io.c"
95 #include "templates_off.h"
96 #undef  BASE_LONG
97
98 #define BASE_UINT
99 #include "templates_on.h"
100 #include "test_source.c"
101 #include "test_io.c"
102 #include "templates_off.h"
103 #undef  BASE_UINT
104
105 #define BASE_INT
106 #include "templates_on.h"
107 #include "test_source.c"
108 #include "test_io.c"
109 #include "templates_off.h"
110 #undef  BASE_INT
111
112 #define BASE_USHORT
113 #include "templates_on.h"
114 #include "test_source.c"
115 #include "test_io.c"
116 #include "templates_off.h"
117 #undef  BASE_USHORT
118
119 #define BASE_SHORT
120 #include "templates_on.h"
121 #include "test_source.c"
122 #include "test_io.c"
123 #include "templates_off.h"
124 #undef  BASE_SHORT
125
126 #define BASE_UCHAR
127 #include "templates_on.h"
128 #include "test_source.c"
129 #include "test_io.c"
130 #include "templates_off.h"
131 #undef  BASE_UCHAR
132
133 #define BASE_CHAR
134 #include "templates_on.h"
135 #include "test_source.c"
136 #include "test_io.c"
137 #include "templates_off.h"
138 #undef  BASE_CHAR
139
140 void my_error_handler (const char *reason, const char *file,
141                        int line, int err);
142
143 int
144 main (void)
145 {
146   gsl_ieee_env_setup ();
147
148   test_func ();
149   test_float_func ();
150   test_long_double_func ();
151   test_ulong_func ();
152   test_long_func ();
153   test_uint_func ();
154   test_int_func ();
155   test_ushort_func ();
156   test_short_func ();
157   test_uchar_func ();
158   test_char_func ();
159   test_complex_func ();
160   test_complex_float_func ();
161   test_complex_long_double_func ();
162
163   test_text ();
164   test_float_text ();
165 #if HAVE_PRINTF_LONGDOUBLE
166   test_long_double_text ();
167 #endif
168   test_ulong_text ();
169   test_long_text ();
170   test_uint_text ();
171   test_int_text ();
172   test_ushort_text ();
173   test_short_text ();
174   test_uchar_text ();
175   test_char_text ();
176   test_complex_text ();
177   test_complex_float_text ();
178 #if HAVE_PRINTF_LONGDOUBLE
179   test_complex_long_double_text ();
180 #endif
181
182   test_binary ();
183   test_float_binary ();
184   test_long_double_binary ();
185   test_ulong_binary ();
186   test_long_binary ();
187   test_uint_binary ();
188   test_int_binary ();
189   test_ushort_binary ();
190   test_short_binary ();
191   test_uchar_binary ();
192   test_char_binary ();
193   test_complex_binary ();
194   test_complex_float_binary ();
195   test_complex_long_double_binary ();
196
197   gsl_set_error_handler (&my_error_handler);
198
199   test_trap ();
200   test_float_trap ();
201   test_long_double_trap ();
202   test_ulong_trap ();
203   test_long_trap ();
204   test_uint_trap ();
205   test_int_trap ();
206   test_ushort_trap ();
207   test_short_trap ();
208   test_uchar_trap ();
209   test_char_trap ();
210   test_complex_trap ();
211   test_complex_float_trap ();
212   test_complex_long_double_trap ();
213
214   exit (gsl_test_summary ());
215 }
216
217 void
218 my_error_handler (const char *reason, const char *file, int line, int err)
219 {
220   if (0)
221     printf ("(caught [%s:%d: %s (%d)])\n", file, line, reason, err);
222   status = 1;
223 }