X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Fexam_lsolve.cpp;h=7961049805d6900adb0ac816572673598b391852;hp=19910da8ea9ab9cd2289a502b6378ca89766bf74;hb=92da4c16f5d6edf276be011a08ce04b352945a83;hpb=e7cc6a764ff67b5885d6633385fac23ccc1dc9a7 diff --git a/check/exam_lsolve.cpp b/check/exam_lsolve.cpp index 19910da8..79610498 100644 --- a/check/exam_lsolve.cpp +++ b/check/exam_lsolve.cpp @@ -3,7 +3,7 @@ * These exams test solving small linear systems of symbolic equations. */ /* - * GiNaC Copyright (C) 1999-2002 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2011 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 @@ -17,12 +17,16 @@ * * 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 "ginac.h" +using namespace GiNaC; -static unsigned exam_lsolve1(void) +#include +using namespace std; + +static unsigned exam_lsolve1() { // A trivial example. unsigned result = 0; @@ -40,7 +44,7 @@ static unsigned exam_lsolve1(void) return result; } -static unsigned exam_lsolve2a(void) +static unsigned exam_lsolve2a() { // An example from the Maple online help. unsigned result = 0; @@ -68,7 +72,7 @@ static unsigned exam_lsolve2a(void) return result; } -static unsigned exam_lsolve2b(void) +static unsigned exam_lsolve2b() { // A boring example from Mathematica's online help. unsigned result = 0; @@ -96,7 +100,7 @@ static unsigned exam_lsolve2b(void) return result; } -static unsigned exam_lsolve2c(void) +static unsigned exam_lsolve2c() { // A more interesting example from the Maple online help. unsigned result = 0; @@ -124,7 +128,7 @@ static unsigned exam_lsolve2c(void) return result; } -static unsigned exam_lsolve2S(void) +static unsigned exam_lsolve2S() { // A degenerate example that went wrong in GiNaC 0.6.2. unsigned result = 0; @@ -152,7 +156,7 @@ static unsigned exam_lsolve2S(void) return result; } -static unsigned exam_lsolve3S(void) +static unsigned exam_lsolve3S() { // A degenerate example that went wrong while trying to improve elimination unsigned result = 0; @@ -183,12 +187,11 @@ static unsigned exam_lsolve3S(void) return result; } -unsigned exam_lsolve(void) +unsigned exam_lsolve() { unsigned result = 0; cout << "examining linear solve" << flush; - clog << "----------linear solve:" << endl; result += exam_lsolve1(); cout << '.' << flush; result += exam_lsolve2a(); cout << '.' << flush; @@ -197,12 +200,10 @@ unsigned exam_lsolve(void) result += exam_lsolve2S(); cout << '.' << flush; result += exam_lsolve3S(); 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_lsolve(); +}