X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Fexam_archive.cpp;h=cc5891cd7a8402abaa0df3b2dbf7a090bc74ce01;hp=97962d7a637bc8cd34b4ab7381f1b16b07a8e536;hb=9cd8ed658fbc4b8c50b40e1db770462526dfb806;hpb=7d870583a6bf21a2ffb7b6f051b702064623892e diff --git a/check/exam_archive.cpp b/check/exam_archive.cpp index 97962d7a..cc5891cd 100644 --- a/check/exam_archive.cpp +++ b/check/exam_archive.cpp @@ -3,7 +3,7 @@ * Here we test GiNaC's archiving system. */ /* - * 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 @@ -20,12 +20,13 @@ * 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; + unsigned exam_archive() { unsigned result = 0; @@ -65,7 +66,8 @@ unsigned exam_archive() } f = ar.unarchive_ex(lst(x, y, mu, dim), "expr 1"); - if (!f.is_equal(e)) { + ex difference = (f - e).expand(); + if (!difference.is_zero()) { clog << "archiving/unarchiving " << e << endl << "erroneously returned " << f << endl; ++result;