3 * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Gerard Jungman, Brian Gough
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.
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.
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.
24 #include <gsl/gsl_block.h>
25 #include <gsl/gsl_ieee_utils.h>
26 #include <gsl/gsl_test.h>
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"
43 #include "templates_off.h"
44 #undef BASE_GSL_COMPLEX_LONG
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
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
61 #define BASE_LONG_DOUBLE
62 #include "templates_on.h"
63 #include "test_source.c"
64 #if HAVE_PRINTF_LONGDOUBLE
67 #include "templates_off.h"
68 #undef BASE_LONG_DOUBLE
71 #include "templates_on.h"
72 #include "test_source.c"
74 #include "templates_off.h"
78 #include "templates_on.h"
79 #include "test_source.c"
81 #include "templates_off.h"
85 #include "templates_on.h"
86 #include "test_source.c"
88 #include "templates_off.h"
92 #include "templates_on.h"
93 #include "test_source.c"
95 #include "templates_off.h"
99 #include "templates_on.h"
100 #include "test_source.c"
102 #include "templates_off.h"
106 #include "templates_on.h"
107 #include "test_source.c"
109 #include "templates_off.h"
113 #include "templates_on.h"
114 #include "test_source.c"
116 #include "templates_off.h"
120 #include "templates_on.h"
121 #include "test_source.c"
123 #include "templates_off.h"
127 #include "templates_on.h"
128 #include "test_source.c"
130 #include "templates_off.h"
134 #include "templates_on.h"
135 #include "test_source.c"
137 #include "templates_off.h"
140 void my_error_handler (const char *reason, const char *file,
146 gsl_ieee_env_setup ();
150 test_long_double_func ();
159 test_complex_func ();
160 test_complex_float_func ();
161 test_complex_long_double_func ();
165 #if HAVE_PRINTF_LONGDOUBLE
166 test_long_double_text ();
176 test_complex_text ();
177 test_complex_float_text ();
178 #if HAVE_PRINTF_LONGDOUBLE
179 test_complex_long_double_text ();
183 test_float_binary ();
184 test_long_double_binary ();
185 test_ulong_binary ();
189 test_ushort_binary ();
190 test_short_binary ();
191 test_uchar_binary ();
193 test_complex_binary ();
194 test_complex_float_binary ();
195 test_complex_long_double_binary ();
197 gsl_set_error_handler (&my_error_handler);
201 test_long_double_trap ();
210 test_complex_trap ();
211 test_complex_float_trap ();
212 test_complex_long_double_trap ();
214 exit (gsl_test_summary ());
218 my_error_handler (const char *reason, const char *file, int line, int err)
221 printf ("(caught [%s:%d: %s (%d)])\n", file, line, reason, err);