X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Fcheck_inifcns.cpp;h=9d493290b5ee854e254e053398ec28d6fa4fe2cf;hp=3ba846108eba59177d0e9e0f64b418138ea5495e;hb=581244b7b8fc9b5f81291e1a3f5731939e3f3d8e;hpb=1f5afe37b4c079821de9810435fa9fa11e4ea17b diff --git a/check/check_inifcns.cpp b/check/check_inifcns.cpp index 3ba84610..9d493290 100644 --- a/check/check_inifcns.cpp +++ b/check/check_inifcns.cpp @@ -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 @@ -18,13 +18,17 @@ * * 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 "checks.h" +#include +#include // rand() +#include "ginac.h" +using namespace std; +using namespace GiNaC; /* Some tests on the sine trigonometric function. */ -static unsigned inifcns_check_sin(void) +static unsigned inifcns_check_sin() { unsigned result = 0; bool errorflag = false; @@ -79,7 +83,7 @@ static unsigned inifcns_check_sin(void) } /* Simple tests on the cosine trigonometric function. */ -static unsigned inifcns_check_cos(void) +static unsigned inifcns_check_cos() { unsigned result = 0; bool errorflag; @@ -133,7 +137,7 @@ static unsigned inifcns_check_cos(void) } /* Simple tests on the tangent trigonometric function. */ -static unsigned inifcns_check_tan(void) +static unsigned inifcns_check_tan() { unsigned result = 0; bool errorflag; @@ -162,7 +166,7 @@ static unsigned inifcns_check_tan(void) } /* Simple tests on the dilogarithm function. */ -static unsigned inifcns_check_Li2(void) +static unsigned inifcns_check_Li2() { // NOTE: this can safely be removed once CLN supports dilogarithms and // checks them itself. @@ -190,24 +194,21 @@ static unsigned inifcns_check_Li2(void) return result; } -unsigned check_inifcns(void) +unsigned check_inifcns() { unsigned result = 0; cout << "checking consistency of symbolic functions" << flush; - clog << "---------consistency of symbolic functions:" << endl; result += inifcns_check_sin(); cout << '.' << flush; result += inifcns_check_cos(); cout << '.' << flush; result += inifcns_check_tan(); cout << '.' << flush; result += inifcns_check_Li2(); cout << '.' << flush; - if (!result) { - cout << " passed " << endl; - clog << "(no output)" << endl; - } else { - cout << " failed " << endl; - } - return result; } + +int main(int argc, char** argv) +{ + return check_inifcns(); +}