]> www.ginac.de Git - ginac.git/blobdiff - check/exam_paranoia.cpp
Finalize 1.7.6 release.
[ginac.git] / check / exam_paranoia.cpp
index 618b35a45e781ec871c18d2720a9b2046178dcf3..b5f1260816be3cd2c2249d919a56d56d8ebf5126 100644 (file)
@@ -6,7 +6,7 @@
  *  these oopses for good, so we run those stupid tests... */
 
 /*
- *  GiNaC Copyright (C) 1999-2017 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
@@ -623,6 +623,19 @@ static unsigned exam_paranoia24()
        return result;
 }
 
+// Bug in add ctor
+unsigned exam_paranoia25()
+{
+       symbol a("a"), b("b"), c("c");
+       ex e = -a + 2*b + c;
+
+       if (e.diff(c).nops() > 1) {
+               clog << "diff(" << e << ",c) was not fully evaluated.\n";
+               return 1;
+       }
+       return 0;
+}
+
 unsigned exam_paranoia()
 {
        unsigned result = 0;
@@ -654,6 +667,7 @@ unsigned exam_paranoia()
        result += exam_paranoia22();  cout << '.' << flush;
        result += exam_paranoia23();  cout << '.' << flush;
        result += exam_paranoia24();  cout << '.' << flush;
+       result += exam_paranoia25();  cout << '.' << flush;
        
        return result;
 }