* this code, it is a sanity check rather deeply rooted in GiNaC's classes. */
/*
- * GiNaC Copyright (C) 1999-2002 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "exams.h"
+#include <iostream>
+#include "ginac.h"
+using namespace std;
+using namespace GiNaC;
-static unsigned exam_powerlaws1(void)
+static unsigned exam_powerlaws1()
{
// (x^a)^b = x^(a*b)
return 0;
}
-static unsigned exam_powerlaws2(void)
+static unsigned exam_powerlaws2()
{
// (a*x)^b = a^b * x^b
return 0;
}
-static unsigned exam_powerlaws3(void)
+static unsigned exam_powerlaws3()
{
// numeric evaluation
return 0;
}
-static unsigned exam_powerlaws4(void)
+static unsigned exam_powerlaws4()
{
// test for mul::eval()
return 0;
}
-static unsigned exam_powerlaws5(void)
+static unsigned exam_powerlaws5()
{
// cabinet of slightly pathological cases
return 0;
}
-unsigned exam_powerlaws(void)
+unsigned exam_powerlaws()
{
unsigned result = 0;
cout << "examining power laws" << flush;
- clog << "----------power laws:" << endl;
result += exam_powerlaws1(); cout << '.' << flush;
result += exam_powerlaws2(); cout << '.' << flush;
result += exam_powerlaws4(); cout << '.' << flush;
result += exam_powerlaws5(); cout << '.' << flush;
- if (!result) {
- cout << " passed " << endl;
- clog << "(no output)" << endl;
- } else {
- cout << " failed " << endl;
- }
-
return result;
}
+
+int main(int argc, char** argv)
+{
+ return exam_powerlaws();
+}