X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=check%2Fexam_hashmap.cpp;h=6f8450966eb61fb369490c01e3de2683eb89a8a7;hp=ae6a324a6411dbb19800273dc8d28d881e368038;hb=a56196f3830a5a467d79b6d7009598e7f05ba7d3;hpb=619d77d2676f7f1a562fb9fefc0ba6754fe2d750 diff --git a/check/exam_hashmap.cpp b/check/exam_hashmap.cpp index ae6a324a..6f845096 100644 --- a/check/exam_hashmap.cpp +++ b/check/exam_hashmap.cpp @@ -3,7 +3,7 @@ * Regression tests for the exhashmap<> container. */ /* - * GiNaC Copyright (C) 1999-2007 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,7 +20,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "exams.h" +#include "ginac.h" +using namespace GiNaC; + +#include +using namespace std; unsigned exam_hashmap() { @@ -28,7 +32,6 @@ unsigned exam_hashmap() unsigned N = 100; cout << "examining hash maps" << flush; - clog << "----------hash maps:" << endl; // Create empty container exhashmap M1; @@ -207,7 +210,7 @@ unsigned exam_hashmap() } if (it->second != 0) { clog << "find() returned an incorrect value" << endl; - +result; + ++result; } M5.erase(it); @@ -279,15 +282,12 @@ unsigned exam_hashmap() clog << "count(4*x^y) returns " << n << " instead of 1" << endl; ++result; } - cout << '.' << flush; - if (!result) { - cout << " passed " << endl; - clog << "(no output)" << endl; - } else { - cout << " failed " << endl; - } - return result; } + +int main(int argc, char** argv) +{ + return exam_hashmap(); +}