X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?a=blobdiff_plain;f=check%2Fexam_numeric.cpp;h=049921b80d3634388d45ad676307c51c0f5be6f4;hb=3d7b9dad7f51c748b52e53ce2f759ae432531de1;hp=e44b995a774ed112a97622ecb12370ccb012ed39;hpb=c28e61da33905ddc69abf893aaffec98aa30d053;p=ginac.git diff --git a/check/exam_numeric.cpp b/check/exam_numeric.cpp index e44b995a..049921b8 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-2010 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2021 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 @@ -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)) {