]> www.ginac.de Git - ginac.git/blob - check/main.cpp
4cf44c6d680fa7201dddd7725a2b8b1a4a2ba49d
[ginac.git] / check / main.cpp
1 // check/main.cpp
2
3 #include <stdexcept>
4 #include <ginac/ginac.h>
5 #include "check.h"
6
7 int main()
8 {
9     unsigned result = 0;
10     
11     try {
12         for (int i=0; i<1; ++i) {
13             result += fcntimer(paranoia_check);
14             result += fcntimer(numeric_output);
15             result += fcntimer(numeric_consist);
16             result += fcntimer(powerlaws);
17             result += fcntimer(expand_subs);
18             result += fcntimer(inifcns_consist);
19             result += fcntimer(differentiation);
20             result += fcntimer(poly_gcd);
21             result += fcntimer(normalization);
22             result += fcntimer(matrix_checks);
23             result += fcntimer(lsolve_onedim);
24             result += fcntimer(series_expansion);
25         }
26     } catch (exception const & e) {
27         cout << "error: caught an exception: " << e.what() << endl;
28                 result++;
29     }
30     
31     if (result) {
32         cout << "error: something went wrong. ";
33         if (result == 1) {
34             cout << "(one failure)" << endl;
35         } else {
36             cout << "(" << result << " individual failures)" << endl;
37         }
38         cout << "please check result.out against result.ref for more details."
39              << endl << "happy debugging!" << endl;
40     }
41
42     return result;
43 }