X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Fexam_numeric.cpp;h=73700a1345fcc9c29eb776cfa2d09893efd7235a;hp=250cb5f011cb345a59401e980187100f4195b3a0;hb=6c946d4c762f5a0d6a3b742f03556dd018d63886;hpb=67467d256b44f5e08498ca81c946d9ffaa25d1e2 diff --git a/check/exam_numeric.cpp b/check/exam_numeric.cpp index 250cb5f0..73700a13 100644 --- a/check/exam_numeric.cpp +++ b/check/exam_numeric.cpp @@ -1,10 +1,10 @@ /** @file exam_numeric.cpp * - * These exams creates some numbers and check the result of several boolean + * These exams creates some numbers and check the result of several Boolean * tests on these numbers like is_integer() etc... */ /* - * GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2015 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 @@ -21,12 +21,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include #include "ginac.h" -using namespace std; using namespace GiNaC; +#include +#include +using namespace std; /* Simple and maybe somewhat pointless consistency tests of assorted tests and * conversions. */ @@ -68,6 +68,11 @@ static unsigned exam_numeric1() << " erroneously not recognized as complex rational" << endl; ++result; } + if (test_crat.info(info_flags::nonnegative)) { + clog << test_crat + << " erroneously recognized as non-negative number" << endl; + ++result; + } int i = numeric(1984).to_int(); if (i-1984) { @@ -361,7 +366,7 @@ static unsigned exam_numeric6() // Read back expression from string string x_as_string = s.str(); - ex x_again(x_as_string, lst(sym)); + ex x_again(x_as_string, lst{sym}); // They should be equal if (!x_again.is_equal(x)) {