]> www.ginac.de Git - ginac.git/blob - check/times.cpp
trivial change just to see whether a mail is being sent to ginac-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-2001 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 #define TIME(which) \
33 try { \
34         result += time_ ## which (); \
35 } catch (const exception &e) { \
36         cout << "Error: caught exception " << e.what() << endl; \
37         ++result; \
38 }
39
40         TIME(dennyfliegner)
41         TIME(gammaseries)
42         TIME(vandermonde)
43         TIME(toeplitz)
44         TIME(lw_A)
45         TIME(lw_B)
46         TIME(lw_C)
47         TIME(lw_D)
48         TIME(lw_E)
49         TIME(lw_F)
50         TIME(lw_G)
51         TIME(lw_H)
52         TIME(lw_IJKL)
53         TIME(lw_M1)
54         TIME(lw_M2)
55         TIME(lw_N)
56         TIME(lw_O)
57         TIME(lw_P)
58         TIME(lw_Pprime)
59         TIME(lw_Q)
60         TIME(lw_Qprime)
61         TIME(antipode)
62         
63         if (result) {
64                 cout << "Error: something went wrong. ";
65                 if (result == 1) {
66                         cout << "(one failure)" << endl;
67                 } else {
68                         cout << "(" << result << " individual failures)" << endl;
69                 }
70                 cout << "please check times.out against times.ref for more details."
71                      << endl << "happy debugging!" << endl;
72         }
73         
74         return result;
75 }