]> www.ginac.de Git - cln.git/blob - tests/exam.cc
- Added lots of @cindex to produce an index.
[cln.git] / tests / exam.cc
1 #include <stdlib.h>
2 #include <cl_io.h>
3 #include <cl_real.h>
4
5 extern int test_integer();
6 extern int test_rational();
7 extern int test_sfloat();
8 extern int test_ffloat();
9 extern int test_dfloat();
10 extern int test_lfloat();
11
12 int test_elementary (void)
13 {
14         int error = 0;
15         error |= test_integer();
16         error |= test_rational();
17         error |= test_sfloat();
18         error |= test_ffloat();
19         error |= test_dfloat();
20         error |= test_lfloat();
21         return error;
22 }
23
24 extern int test_gcd (void);
25 extern int test_xgcd (void);
26 extern int test_sqrtp (void);
27
28 int test_all (void)
29 {
30         int error = 0;
31         error |= test_elementary();
32         error |= test_gcd();
33         error |= test_xgcd();
34         error |= test_sqrtp();
35         return error;
36 }
37
38 int main ()
39 {
40         if (!test_all()) {
41                 fprint (cl_stdout, "Tests passed.\n");
42                 exit(0);
43         } else {
44                 fprint (cl_stdout, "Tests failed.\n");
45                 exit(1);
46         }
47 }