]> www.ginac.de Git - ginac.git/blobdiff - check/exam_inifcns.cpp
lexer: when switching to another output stream, clean last read character.
[ginac.git] / check / exam_inifcns.cpp
index a3a09650cd809f6020f820a0b7d99857b5c05382..b86b4703cf7306dcc623badebbeebb94cfd05aec 100644 (file)
@@ -4,7 +4,7 @@
  *  functions. */
 
 /*
- *  GiNaC Copyright (C) 1999-2003 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;
 
 /* Assorted tests on other transcendental functions. */
 static unsigned inifcns_consist_trans()
 {
+       using GiNaC::asin; using GiNaC::acos;
+
        unsigned result = 0;
        symbol x("x");
        ex chk;
@@ -163,6 +168,8 @@ static unsigned inifcns_consist_gamma()
    arguments where the result exists in closed form and check if it's ok. */
 static unsigned inifcns_consist_psi()
 {
+       using GiNaC::log;
+
        unsigned result = 0;
        symbol x;
        ex e, f;
@@ -213,19 +220,16 @@ unsigned exam_inifcns()
        unsigned result = 0;
        
        cout << "examining consistency of symbolic functions" << flush;
-       clog << "----------consistency of symbolic functions:" << endl;
        
        result += inifcns_consist_trans();  cout << '.' << flush;
        result += inifcns_consist_gamma();  cout << '.' << flush;
        result += inifcns_consist_psi();  cout << '.' << flush;
        result += inifcns_consist_zeta();  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_inifcns();
+}