]> www.ginac.de Git - ginac.git/blobdiff - check/exam_numeric.cpp
Finalize 1.7.6 release.
[ginac.git] / check / exam_numeric.cpp
index 8f45dfedb47e273a612fbd1d0c99aac14a6b7dbe..ad7da61c1dd9a53321deb53b013e526cd72241c2 100644 (file)
@@ -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-2007 Johannes Gutenberg University Mainz, Germany
+ *  GiNaC Copyright (C) 1999-2019 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
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#include <iostream>
-#include <sstream>
 #include "ginac.h"
-using namespace std;
 using namespace GiNaC;
 
+#include <iostream>
+#include <sstream>
+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)) {