- Fixed <strstream> to <sstream>.

This commit is contained in:
Lutz Kettner 2003-05-08 19:23:22 +00:00
parent 82bdb34e7a
commit 1186f57d49
3 changed files with 26 additions and 9 deletions

View File

@ -1,6 +1,10 @@
Union_find Package: Release changes
----------------------------------------------------------------------
1.7 (08 May 2003)
- Fixed <strstream> to <sstream>.
1.6 (14 Feb 2003)
- Fixed bug in the number_of_sets() counting, changed ++sets to --sets

View File

@ -3,7 +3,7 @@
#include <CGAL/basic.h>
#include <iostream>
#include <strstream>
#include <sstream>
#include <vector>
#define CGAL_TEST_START int cgal_test_res=0
@ -12,13 +12,26 @@
std::cerr<<"ERROR: ("<<__LINE__ <<") test "<<#b<<" failed."<<std::endl; } \
else
#define CGAL_IO_TEST(datao,datai) { \
std::ostrstream OS; OS<<datao<<'\n'<<'\0'; \
std::istrstream IS(OS.str()); OS.freeze(0); IS>>datai; \
if (datao != datai) { ++cgal_test_res; \
std::cerr<<"ERROR in IO of "<<#datao<<" "<<#datai<<" : "\
<<OS.str()<<" failed."<<std::endl;\
OS.freeze(0); }}
#define CGAL_IO_TEST(datao,datai,iomode) { \
std::stringstream S; \
CGAL::set_mode(S,iomode); \
S << datao; \
if ( iomode != CGAL::IO::BINARY) \
S << '\n'; \
S << datao; \
S >> datai; \
if (datao != datai) { \
++cgal_test_res; \
std::cerr << "ERROR in 1.IO " << #iomode << " of " << #datao << " "\
<< #datai << " : " << S.str() << " failed." <<std::endl; \
} \
S >> datai; \
if (datao != datai) { \
++cgal_test_res; \
std::cerr << "ERROR in 2.IO " << #iomode << " of " << #datao << " "\
<< #datai << " : " << S.str() << " failed." <<std::endl; \
} \
}
#define CGAL_TEST_END return cgal_test_res

View File

@ -1 +1 @@
1.6 (14 Feb 2003)
1.7 (08 May 2003)