Added script front-end for primer-design code
[htsworkflow.git] / htswanalysis / MACS / lib / gsl / gsl-1.11 / statistics / test.c
1 /* statistics/test.c
2  * 
3  * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2007 Jim Davies, 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 <string.h>
22 #include <stdlib.h>
23 #include <math.h>
24
25 #include <gsl/gsl_math.h>
26 #include <gsl/gsl_test.h>
27 #include <gsl/gsl_sort.h>
28 #include <gsl/gsl_sort_vector.h>
29 #include <gsl/gsl_statistics.h>
30 #include <gsl/gsl_ieee_utils.h>
31
32 int test_nist (void);
33
34 /* Test program for mean.c.  JimDavies 7.96 */
35
36 #define BASE_LONG_DOUBLE
37 #include "templates_on.h"
38 #include "test_float_source.c"
39 #include "templates_off.h"
40 #undef  BASE_LONG_DOUBLE
41
42 #define BASE_DOUBLE
43 #include "templates_on.h"
44 #include "test_float_source.c"
45 #include "templates_off.h"
46 #undef  BASE_DOUBLE
47
48 #define BASE_FLOAT
49 #include "templates_on.h"
50 #include "test_float_source.c"
51 #include "templates_off.h"
52 #undef  BASE_FLOAT
53
54 #define BASE_ULONG
55 #include "templates_on.h"
56 #include "test_int_source.c"
57 #include "templates_off.h"
58 #undef  BASE_ULONG
59
60 #define BASE_LONG
61 #include "templates_on.h"
62 #include "test_int_source.c"
63 #include "templates_off.h"
64 #undef  BASE_LONG
65
66 #define BASE_UINT
67 #include "templates_on.h"
68 #include "test_int_source.c"
69 #include "templates_off.h"
70 #undef  BASE_UINT
71
72 #define BASE_INT
73 #include "templates_on.h"
74 #include "test_int_source.c"
75 #include "templates_off.h"
76 #undef  BASE_INT
77
78 #define BASE_USHORT
79 #include "templates_on.h"
80 #include "test_int_source.c"
81 #include "templates_off.h"
82 #undef  BASE_USHORT
83
84 #define BASE_SHORT
85 #include "templates_on.h"
86 #include "test_int_source.c"
87 #include "templates_off.h"
88 #undef  BASE_SHORT
89
90 #define BASE_UCHAR
91 #include "templates_on.h"
92 #include "test_int_source.c"
93 #include "templates_off.h"
94 #undef  BASE_UCHAR
95
96 #define BASE_CHAR
97 #include "templates_on.h"
98 #include "test_int_source.c"
99 #include "templates_off.h"
100 #undef  BASE_CHAR
101
102
103 int
104 main (void)
105 {
106   size_t s1, s2;
107
108   gsl_ieee_env_setup ();
109
110   for (s1 = 1; s1 < 4 ; s1++) 
111     {
112       s2 = (s1 < 3) ? 1 : (s1 - 1) ;
113
114       test_func (s1,s2);
115       test_float_func (s1,s2);
116       test_long_double_func (s1,s2);
117       
118       test_ulong_func (s1,s2);
119       test_long_func (s1,s2);
120       test_uint_func (s1,s2);
121       test_int_func (s1,s2);
122       test_ushort_func (s1,s2);
123       test_short_func (s1,s2);
124       test_uchar_func (s1,s2);
125       test_char_func (s1,s2);
126     }
127
128   test_nist();
129
130   exit (gsl_test_summary ());
131 }
132