]> www.ginac.de Git - ginac.git/blob - check/times.cpp
*sigh* when will we move the Makefile.in's out of CVS?
[ginac.git] / check / times.cpp
1 /** @file times.cpp
2  *
3  *  Main program that calls the individual timings. */
4
5 /*
6  *  GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
7  *
8  *  This program is free software; you can redistribute it and/or modify
9  *  it under the terms of the GNU General Public License as published by
10  *  the Free Software Foundation; either version 2 of the License, or
11  *  (at your option) any later version.
12  *
13  *  This program is distributed in the hope that it will be useful,
14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *  GNU General Public License for more details.
17  *
18  *  You should have received a copy of the GNU General Public License
19  *  along with this program; if not, write to the Free Software
20  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
22
23 #include <stdexcept>
24 #include <iostream>
25
26 #include "times.h"
27
28 int main()
29 {
30     unsigned result = 0;
31     
32     try {
33         result += time_dennyfliegner();
34     } catch (const exception &e) {
35         cout << "Error: caught exception " << e.what() << endl;
36         ++result;
37     }
38     
39 #if 0
40     try {
41         result += time_gammaseries();
42     } catch (const exception &e) {
43         cout << "Error: caught exception " << e.what() << endl;
44         ++result;
45     }
46 #endif
47     
48     try {
49         result += time_vandermonde();
50     } catch (const exception &e) {
51         cout << "Error: caught exception " << e.what() << endl;
52         ++result;
53     }
54     
55     try {
56         result += time_toeplitz();
57     } catch (const exception &e) {
58         cout << "Error: caught exception " << e.what() << endl;
59         ++result;
60     }
61     
62     try {
63         result += time_lw_A();
64     } catch (const exception &e) {
65         cout << "Error: caught exception " << e.what() << endl;
66         ++result;
67     }
68     
69     try {
70         result += time_lw_B();
71     } catch (const exception &e) {
72         cout << "Error: caught exception " << e.what() << endl;
73         ++result;
74     }
75     
76     try {
77         result += time_lw_C();
78     } catch (const exception &e) {
79         cout << "Error: caught exception " << e.what() << endl;
80         ++result;
81     }
82     
83     try {
84         result += time_lw_D();
85     } catch (const exception &e) {
86         cout << "Error: caught exception " << e.what() << endl;
87         ++result;
88     }
89     
90     try {
91         result += time_lw_E();
92     } catch (const exception &e) {
93         cout << "Error: caught exception " << e.what() << endl;
94         ++result;
95     }
96     
97     try {
98         result += time_lw_F();
99     } catch (const exception &e) {
100         cout << "Error: caught exception " << e.what() << endl;
101         ++result;
102     }
103     
104     try {
105         result += time_lw_G();
106     } catch (const exception &e) {
107         cout << "Error: caught exception " << e.what() << endl;
108         ++result;
109     }
110     
111     try {
112         result += time_lw_H();
113     } catch (const exception &e) {
114         cout << "Error: caught exception " << e.what() << endl;
115         ++result;
116     }
117     
118     try {
119         result += time_lw_IJKL();
120     } catch (const exception &e) {
121         cout << "Error: caught exception " << e.what() << endl;
122         ++result;
123     }
124     
125     try {
126         result += time_lw_M1();
127     } catch (const exception &e) {
128         cout << "Error: caught exception " << e.what() << endl;
129         ++result;
130     }
131     
132     try {
133         result += time_lw_O();
134     } catch (const exception &e) {
135         cout << "Error: caught exception " << e.what() << endl;
136         ++result;
137     }
138     
139     try {
140         result += time_lw_P();
141     } catch (const exception &e) {
142         cout << "Error: caught exception " << e.what() << endl;
143         ++result;
144     }
145     
146     try {
147         result += time_lw_Pprime();
148     } catch (const exception &e) {
149         cout << "Error: caught exception " << e.what() << endl;
150         ++result;
151     }
152     
153     try {
154         result += time_lw_Q();
155     } catch (const exception &e) {
156         cout << "Error: caught exception " << e.what() << endl;
157         ++result;
158     }
159     
160     try {
161         result += time_lw_Qprime();
162     } catch (const exception &e) {
163         cout << "Error: caught exception " << e.what() << endl;
164         ++result;
165     }
166     
167     if (result) {
168         cout << "Error: something went wrong. ";
169         if (result == 1) {
170             cout << "(one failure)" << endl;
171         } else {
172             cout << "(" << result << " individual failures)" << endl;
173         }
174         cout << "please check times.out against times.ref for more details."
175              << endl << "happy debugging!" << endl;
176     }
177     
178     return result;
179 }