add std:: to cout endl ofstream ifstream

This commit is contained in:
Mariette Yvinec 1999-08-16 08:58:34 +00:00
parent 25c1cbf1a5
commit 6713f47dda
16 changed files with 150 additions and 160 deletions

View File

@ -29,10 +29,10 @@ template <class Triangulation>
void
_test_cls_constrained_triangulation(const Triangulation &)
{
using std::cout;
using std::ofstream;
using std::ifstream;
using std::endl;
//using std::cout;
//using std::ofstream;
//using std::ifstream;
//using std::endl;
typedef Triangulation Cls;
@ -57,11 +57,11 @@ _test_cls_constrained_triangulation(const Triangulation &)
// Constructors
cout << " constructors " << endl;
std::cout << " constructors " << std::endl;
list_constraints l;
// Empty triangulation (0-dimensional)
cout << " 0-Dim " <<endl;
std::cout << " 0-Dim " <<std::endl;
Cls T0_1;
assert( T0_1.dimension() == -1 );
assert( T0_1.number_of_vertices() == 0 );
@ -77,7 +77,7 @@ _test_cls_constrained_triangulation(const Triangulation &)
// Build dummy triangulations, 1-dimensional
cout << " 1-Dim "<<endl;
std::cout << " 1-Dim "<<std::endl;
int m;
for (m=0; m<20; m++)
l.push_back(Constraint(Point(3*m, 2*m),Point(3*m,2*m) ));
@ -99,7 +99,7 @@ _test_cls_constrained_triangulation(const Triangulation &)
// Build triangulations, 2-dimensional
cout << " 2-Dim "<< endl;
std::cout << " 2-Dim "<< std::endl;
Point lp[5]= {Point(0,0),Point(1,0),Point(0,1),Point(-1,0),Point(0,-1)};
for (m=1;m<5;m++)
l.push_back(Constraint(lp[0],lp[m]));
@ -126,7 +126,7 @@ _test_cls_constrained_triangulation(const Triangulation &)
// Build triangulation with iterator
cout << " With input iterator" << endl;
std::cout << " With input iterator" << std::endl;
list_iterator first=l.begin();
list_iterator last=l.end();
Cls T2_3(first,last);
@ -142,7 +142,7 @@ _test_cls_constrained_triangulation(const Triangulation &)
// Points locations
//to check if functionnality is accessible
// 1-dimensional
// cout << " point locations 1-dim" << endl;
// std::cout << " point locations 1-dim" << std::endl;
Locate_type lt;
int li;
Face_handle f;
@ -161,7 +161,7 @@ _test_cls_constrained_triangulation(const Triangulation &)
// 2-dimensional
cout << " point locations 2-dim" << endl;
std::cout << " point locations 2-dim" << std::endl;
f = T2_2.locate(Point(0,0),lt,li); assert( lt == Cls::VERTEX );
assert( T2_2.geom_traits().compare(f->vertex(li)->point(), Point(0,0)) );
f = T2_2.locate(Point(3,2),lt,li); assert( lt == Cls::VERTEX );
@ -181,7 +181,7 @@ _test_cls_constrained_triangulation(const Triangulation &)
/*************************/
/******* Iterators *******/
cout << " iterators" << endl;
std::cout << " iterators" << std::endl;
_test_iterators(T1_1);
_test_iterators(T1_2);
_test_iterators(T2_1);
@ -189,7 +189,7 @@ _test_cls_constrained_triangulation(const Triangulation &)
/***************************/
/******* Circulators *******/
cout << " circulators" << endl;
std::cout << " circulators" << std::endl;
_test_circulators(T1_1);
_test_circulators(T1_2);
_test_circulators(T2_1);
@ -197,7 +197,7 @@ _test_cls_constrained_triangulation(const Triangulation &)
// Line_face_circulator
cout << " line face circulator " << endl;
std::cout << " line face circulator " << std::endl;
typedef typename Cls::Line_face_circulator LFC;
LFC fc= T2_2.line_walk(Point(-1,-1),Point(10,10));
@ -242,7 +242,7 @@ _test_cls_constrained_triangulation(const Triangulation &)
/*****************************/
/******** Miscellaneaous *****/
cout << " misc." << endl;
std::cout << " misc." << std::endl;
assert( T0_1.ccw(0) == 1 );
assert( T0_1.ccw(1) == 2 );
assert( T0_1.ccw(2) == 0 );
@ -261,7 +261,7 @@ _test_cls_constrained_triangulation(const Triangulation &)
/********************/
/******** I/O *******/
cout << " output to a file" << endl;
std::cout << " output to a file" << std::endl;
std::ofstream of0_1("T01.triangulation", std::ios::out);
CGAL::set_ascii_mode(of0_1);

View File

@ -37,7 +37,7 @@ _test_cls_delaunay_triangulation_2( const Del & )
_test_cls_triangulation_2( Delaunay() );
// Constructors
cout << " constructors(3)" << endl;
std::cout << " constructors(3)" << std::endl;
// Build dummy delaunay triangulations, 1- and 2-dimensional
Delaunay T1;
@ -70,7 +70,7 @@ _test_cls_delaunay_triangulation_2( const Del & )
/********************/
/***** Duality ******/
cout << " duality" << endl;
std::cout << " duality" << std::endl;
_test_delaunay_duality(T1);
_test_delaunay_duality(T2);
_test_delaunay_duality(T3);

View File

@ -53,11 +53,6 @@ template <class Triangulation>
void
_test_cls_reg_triangulation_2( const Triangulation & )
{
using std::cout;
using std::ofstream;
using std::ifstream;
using std::endl;
typedef Triangulation Cls;
// We assume the traits class has been tested already
@ -156,7 +151,7 @@ _test_cls_reg_triangulation_2( const Triangulation & )
/*****************************/
/***** CONSTRUCTORS (1) ******/
cout << " constructors(1)" << endl;
std::cout << " constructors(1)" << std::endl;
Cls T1;
assert( T1.dimension() == 0 ); // should be -1, but we'll discuss this
@ -172,7 +167,7 @@ _test_cls_reg_triangulation_2( const Triangulation & )
T3.swap(T1);
cout << " insertions 0-dim" << endl;
std::cout << " insertions 0-dim" << std::endl;
Cls T0_0;
assert( T0_0.dimension() == 0 );
@ -200,7 +195,7 @@ Cls T0_2;
/******** 1-dimensional triangulations ******/
// T1_n denotes a 1-dimensional triangulation with n vertices
// when there are several, we use T1_n_p
cout << " insertions 1-dim" << endl;
std::cout << " insertions 1-dim" << std::endl;
Cls T1_2;
Vertex_handle v1_2_1 = T1_2.insert(wp1);
@ -253,7 +248,7 @@ Cls T0_2;
assert( T1_6.is_valid() );
/******** 2-dimensional triangulations ******/
cout << " insertions 2-dim" << endl;
std::cout << " insertions 2-dim" << std::endl;
Cls T2_1;
Vertex_handle v2_1_0 = T2_1.insert(wp0);
@ -343,7 +338,7 @@ Cls T0_2;
assert( T2_7.is_valid() );
cout << " constructors (2)" << endl;
std::cout << " constructors (2)" << std::endl;
// test copy_constructor with non-empty 0-triangulation
Cls T0_1_1( T0_1 );
@ -426,7 +421,7 @@ Cls T0_2;
/*********************************************/
/****** FINITE/INFINITE VERTICES/FACES *******/
cout << " finite/infinite vertices/faces" << endl;
std::cout << " finite/infinite vertices/faces" << std::endl;
_test_fct_is_infinite( T0_0 );
_test_fct_is_infinite( T0_1 );
_test_fct_is_infinite( T1_2 );
@ -449,7 +444,7 @@ Cls T0_2;
// No need because of precondition (at least two vertices)
// Check point location in 1-dimensional triangulations
cout << " point locations 1-dim" << endl;
std::cout << " point locations 1-dim" << std::endl;
Cls T1_3_2;
T1_3_2.insert(p1);
T1_3_2.insert(p2);
@ -484,7 +479,7 @@ Cls T0_2;
assert( _test_is_to_the_left(T1_3_2,p6,f,li) );
// Check point location in 2-dimensional triangulations
cout << " point locations 2-dim" << endl;
std::cout << " point locations 2-dim" << std::endl;
f = T2_1.locate(p0,lt,li); assert( lt == Cls::VERTEX );
assert( T2_1.geom_traits().compare(f->vertex(li)->point(), p0) );
f = T2_1.locate(p1,lt,li); assert( lt == Cls::VERTEX );
@ -528,7 +523,7 @@ Cls T0_2;
/*************************/
/******* Iterators *******/
cout << " iterators" << endl;
std::cout << " iterators" << std::endl;
// _test_iterators(T0_0);
// _test_iterators(T0_1);
_test_iterators(T1_2);
@ -544,7 +539,7 @@ Cls T0_2;
/***************************/
/******* Circulators *******/
cout << " circulators" << endl;
std::cout << " circulators" << std::endl;
// _test_circulators(T0_0);
// _test_circulators(T0_1);
_test_circulators(T1_2);
@ -560,7 +555,7 @@ Cls T0_2;
// Line_face_circulator
cout << " line face circulator " << endl;
std::cout << " line face circulator " << std::endl;
typedef typename Cls::Line_face_circulator LFC;
// here == operator needed for Point!
// testing with the grid triangulation
@ -616,7 +611,7 @@ Cls T0_2;
/*****************************/
/******** Miscellaneaous *****/
cout << " misc." << endl;
std::cout << " misc." << std::endl;
assert( T0_0.ccw(0) == 1 );
assert( T0_0.ccw(1) == 2 );
assert( T0_0.ccw(2) == 0 );
@ -635,67 +630,67 @@ Cls T0_2;
/********************/
/******** I/O *******/
cout << " output to a file" << endl;
ofstream of0_0("T00.triangulation", ios::out);
std::cout << " output to a file" << std::endl;
std::ofstream of0_0("T00.triangulation", ios::out);
CGAL::set_ascii_mode(of0_0);
of0_0 << T0_1; of0_0.close();
ofstream of0_1("T01.triangulation");
std::ofstream of0_1("T01.triangulation");
CGAL::set_ascii_mode(of0_1);
of0_1 << T0_1; of0_1.close();
ofstream of1_2("T12.triangulation");
std::ofstream of1_2("T12.triangulation");
CGAL::set_ascii_mode(of1_2);
of1_2 << T1_2; of1_2.close();
ofstream of1_5("T15.triangulation");
std::ofstream of1_5("T15.triangulation");
CGAL::set_ascii_mode(of1_5);
of1_5 << T1_5; of1_5.close();
ofstream of1_6("T16.triangulation");
std::ofstream of1_6("T16.triangulation");
CGAL::set_ascii_mode(of1_6);
of1_6 << T1_6; of1_6.close();
ofstream of2_1("T21.triangulation");
std::ofstream of2_1("T21.triangulation");
CGAL::set_ascii_mode(of2_1);
of2_1 << T2_1; of2_1.close();
ofstream of2_3("T23.triangulation");
std::ofstream of2_3("T23.triangulation");
CGAL::set_ascii_mode(of2_3);
of2_3 << T2_3; of2_3.close();
ofstream of2_5("T25.triangulation");
std::ofstream of2_5("T25.triangulation");
CGAL::set_ascii_mode(of2_5);
of2_5 << T2_5; of2_5.close();
ofstream of2_6("T26.triangulation");
std::ofstream of2_6("T26.triangulation");
CGAL::set_ascii_mode(of2_6);
of2_6 << T2_6; of2_6.close();
cout << " input from a file" << endl;
ifstream if0_0("T00.triangulation"); CGAL::set_ascii_mode(if0_0);
std::cout << " input from a file" << std::endl;
std::ifstream if0_0("T00.triangulation"); CGAL::set_ascii_mode(if0_0);
Cls T0_0_copy; if0_0 >> T0_0_copy;
// assert( T0_0_copy.number_of_vertices() == T0_0.number_of_vertices() );
ifstream if0_1("T01.triangulation"); CGAL::set_ascii_mode(if0_1);
std::ifstream if0_1("T01.triangulation"); CGAL::set_ascii_mode(if0_1);
Cls T0_1_copy; if0_1 >> T0_1_copy;
// assert( T0_1_copy.number_of_vertices() == T0_1.number_of_vertices() );
ifstream if1_2("T12.triangulation"); CGAL::set_ascii_mode(if1_2);
std::ifstream if1_2("T12.triangulation"); CGAL::set_ascii_mode(if1_2);
Cls T1_2_copy; if1_2 >> T1_2_copy;
// assert( T1_2_copy.number_of_vertices() == T1_2.number_of_vertices() );
ifstream if1_5("T15.triangulation"); CGAL::set_ascii_mode(if1_5);
std::ifstream if1_5("T15.triangulation"); CGAL::set_ascii_mode(if1_5);
Cls T1_5_copy; if1_5 >> T1_5_copy;
// assert( T1_5_copy.number_of_vertices() == T1_5.number_of_vertices() );
ifstream if1_6("T16.triangulation"); CGAL::set_ascii_mode(if1_6);
std::ifstream if1_6("T16.triangulation"); CGAL::set_ascii_mode(if1_6);
Cls T1_6_copy; if1_6 >> T1_6_copy;
// assert( T1_6_copy.number_of_vertices() == T1_6.number_of_vertices() );
ifstream if2_1("T21.triangulation"); CGAL::set_ascii_mode(if2_1);
std::ifstream if2_1("T21.triangulation"); CGAL::set_ascii_mode(if2_1);
Cls T2_1_copy; if2_1 >> T2_1_copy;
// assert( T2_1_copy.number_of_vertices() == T2_1.number_of_vertices() );
ifstream if2_3("T23.triangulation"); CGAL::set_ascii_mode(if2_3);
std::ifstream if2_3("T23.triangulation"); CGAL::set_ascii_mode(if2_3);
Cls T2_3_copy; if2_3 >> T2_3_copy;
// assert( T2_3_copy.number_of_vertices() == T2_3.number_of_vertices() );
ifstream if2_5("T25.triangulation"); CGAL::set_ascii_mode(if2_5);
std::ifstream if2_5("T25.triangulation"); CGAL::set_ascii_mode(if2_5);
Cls T2_5_copy; if2_5 >> T2_5_copy;
// assert( T2_5_copy.number_of_vertices() == T2_5.number_of_vertices() );
ifstream if2_6("T26.triangulation"); CGAL::set_ascii_mode(if2_6);
std::ifstream if2_6("T26.triangulation"); CGAL::set_ascii_mode(if2_6);
Cls T2_6_copy; if2_6 >> T2_6_copy;
// assert( T2_6_copy.number_of_vertices() == T2_6.number_of_vertices() );
/**********************/
/***** REMOVALS *******/
cout << " removals" << endl;
std::cout << " removals" << std::endl;
// // test remove_first()
// T0_1.remove_first(T0_1.finite_vertex());
@ -757,5 +752,5 @@ Cls T0_2;
assert( T2_7.number_of_vertices() == 0 );
// test destructors and return
cout << " test destructors and return" << endl;
std::cout << " test destructors and return" << std::endl;
}

View File

@ -53,7 +53,7 @@ _test_cls_tds_2( const Tds &, const Gt &)
CGAL::_test_cls_tds_face( Face(), Gt() );
// Test constructors
cout << " constructors" << endl;
std::cout << " constructors" << std::endl;
Tds tds0;
Tds tds1;
Tds tds2(tds1);
@ -66,7 +66,7 @@ _test_cls_tds_2( const Tds &, const Gt &)
// (), = and swap to be tested later again with non trivial tds
// // Setting functions - access functions
// cout << " setting functions access functions" << endl;
// std::cout << " setting functions access functions" << std::endl;
// assert(tds1.dimension() == -1);
// assert(tds1.number_of_vertices() == 0 );
@ -83,7 +83,7 @@ _test_cls_tds_2( const Tds &, const Gt &)
// tds1.set_infinite_vertex(vt2);
// // Finite and infinite vertices and faces
// cout << " finite/infinite faces and vertices" << endl;
// std::cout << " finite/infinite faces and vertices" << std::endl;
// assert( !tds1.is_infinite(vt1) );
// assert( tds1.is_infinite(vt2) );
// assert( !tds1.is_infinite(f1) );
@ -102,7 +102,7 @@ _test_cls_tds_2( const Tds &, const Gt &)
// misc.
cout << " miscellaneous" << endl;
std::cout << " miscellaneous" << std::endl;
assert( tds1.ccw(0) == 1 );
assert( tds1.ccw(1) == 2 );
assert( tds1.ccw(2) == 0 );
@ -115,7 +115,7 @@ _test_cls_tds_2( const Tds &, const Gt &)
// tds3 1 dim
// tds4 2dim
cout << " insert and flip" << endl;
std::cout << " insert and flip" << std::endl;
Vertex* w1 = tds1.insert_first();
assert(tds1.dimension()== -1);
assert(tds1.number_of_vertices() == 1);
@ -209,7 +209,7 @@ _test_cls_tds_2( const Tds &, const Gt &)
w1 = tds1.insert_first();
//access
cout << " test access" << endl;
std::cout << " test access" << std::endl;
assert(tds0.dimension() == -1 && tds0.number_of_vertices() == 0 &&
tds0.number_of_faces()== 0 && tds0.number_of_edges() == 0 &&
tds0.number_of_full_dim_faces() == 0);
@ -228,7 +228,7 @@ _test_cls_tds_2( const Tds &, const Gt &)
//clear(), swap() and copy_constructor and copy
cout << " clear, swap, assign and copy " << endl;
std::cout << " clear, swap, assign and copy " << std::endl;
Tds tds1b(tds1);
assert(tds1b.is_valid());
Tds tds1c = tds1b;
@ -280,7 +280,7 @@ _test_cls_tds_2( const Tds &, const Gt &)
//iterators are tested by is_valid()
//test circulators and v->degree()
cout << " circulators" <<endl;
std::cout << " circulators" <<std::endl;
_test_tds_circulators(tds0);
_test_tds_circulators(tds1);
_test_tds_circulators(tds2);
@ -294,7 +294,7 @@ _test_cls_tds_2( const Tds &, const Gt &)
_test_tds_iterators(tds4);
//has_vertex
cout << " has_vertex" << endl;
std::cout << " has_vertex" << std::endl;
assert (tds4.has_vertex(v4_5));
assert (tds3.has_vertex(v3));
assert (tds2.has_vertex(v2));
@ -302,42 +302,42 @@ _test_cls_tds_2( const Tds &, const Gt &)
//test input, output
cout << " output to a file" << endl;
ofstream of0("file_tds0");
std::cout << " output to a file" << std::endl;
std::ofstream of0("file_tds0");
CGAL::set_ascii_mode(of0);
of0 << tds0 ;
of0.close();
ofstream of1("file_tds1");
std::ofstream of1("file_tds1");
CGAL::set_ascii_mode(of1);
of1 << tds1 ;
of1.close();
ofstream of2("file_tds2");
std::ofstream of2("file_tds2");
CGAL::set_ascii_mode(of2);
of2 << tds2 ;
of2.close();
ofstream of3("file_tds3");
std::ofstream of3("file_tds3");
CGAL::set_ascii_mode(of3);
of3 << tds3 ;
of3.close();
ofstream of4("file_tds4");
std::ofstream of4("file_tds4");
CGAL::set_ascii_mode(of4);
of4 << tds4 ;
of4.close();
cout << " input from a file" << endl;
ifstream if0("file_tds0"); CGAL::set_ascii_mode(if0);
std::cout << " input from a file" << std::endl;
std::ifstream if0("file_tds0"); CGAL::set_ascii_mode(if0);
Tds tds0f; if0 >> tds0f ; assert( tds0f.is_valid());
ifstream if1("file_tds1"); CGAL::set_ascii_mode(if1);
std::ifstream if1("file_tds1"); CGAL::set_ascii_mode(if1);
Tds tds1f; if1 >> tds1f; assert( tds1f.is_valid());
ifstream if2("file_tds2"); CGAL::set_ascii_mode(if2);
std::ifstream if2("file_tds2"); CGAL::set_ascii_mode(if2);
Tds tds2f; if2 >> tds2f ; assert( tds2f.is_valid());
ifstream if3("file_tds3"); CGAL::set_ascii_mode(if3);
std::ifstream if3("file_tds3"); CGAL::set_ascii_mode(if3);
Tds tds3f; if3 >> tds3f ; assert( tds3f.is_valid());
ifstream if4("file_tds4"); CGAL::set_ascii_mode(if4);
std::ifstream if4("file_tds4"); CGAL::set_ascii_mode(if4);
Tds tds4f; if4 >> tds4f ; assert( tds4f.is_valid());
// test destructor and return
cout << " destructors and return" << endl;
std::cout << " destructors and return" << std::endl;
}
template< class Tds>

View File

@ -29,7 +29,7 @@ template <class Face, class Gt>
void
_test_cls_tds_face( const Face &, const Gt & )
{
cout << " face" << endl;
std::cout << " face" << std::endl;
typedef typename Face::Vertex Vertex;
// typedef typename Face::Edge Edge;

View File

@ -28,7 +28,7 @@ template <class Vertex, class Gt>
void
_test_cls_tds_vertex( const Vertex &, const Gt & )
{
cout << " vertex" << endl;
std::cout << " vertex" << std::endl;
typedef typename Vertex::Point Point;
typedef typename Vertex::Face Face;

View File

@ -51,11 +51,6 @@ template <class Triangulation>
void
_test_cls_triangulation_2( const Triangulation & )
{
using std::cout;
using std::ofstream;
using std::ifstream;
using std::endl;
typedef Triangulation Cls;
// We assume the traits class has been tested already
@ -130,7 +125,7 @@ _test_cls_triangulation_2( const Triangulation & )
/*****************************/
/***** CONSTRUCTORS (1) ******/
cout << " constructors(1)" << endl;
std::cout << " constructors(1)" << std::endl;
Cls T1;
assert( T1.dimension() == -1 );
@ -152,7 +147,7 @@ _test_cls_triangulation_2( const Triangulation & )
// so there is no need to put assert at the end of all of them
/******* 0-dimensional triangulations ******/
cout << " insertions 0-dim" << endl;
std::cout << " insertions 0-dim" << std::endl;
Cls T0_0;
assert( T0_0.dimension() == -1 );
@ -176,7 +171,7 @@ _test_cls_triangulation_2( const Triangulation & )
/******** 1-dimensional triangulations ******/
// T1_n denotes a 1-dimensional triangulation with n vertices
// when there are several, we use T1_n_p
cout << " insertions 1-dim" << endl;
std::cout << " insertions 1-dim" << std::endl;
Cls T1_2;
Vertex_handle v1_2_1 = T1_2.insert(p1);
@ -225,7 +220,7 @@ _test_cls_triangulation_2( const Triangulation & )
assert( T1_6.is_valid() );
/******** 2-dimensional triangulations ******/
cout << " insertions 2-dim" << endl;
std::cout << " insertions 2-dim" << std::endl;
Cls T2_1;
Vertex_handle v2_1_0 = T2_1.insert(p0);
@ -318,7 +313,7 @@ _test_cls_triangulation_2( const Triangulation & )
assert( T2_7.is_valid() );
// test flip
cout << " test flip " << endl;
std::cout << " test flip " << std::endl;
Cls T2_8;
T2_8.insert(Point(0,0,1));
T2_8.insert(Point(1,0,1));
@ -335,7 +330,7 @@ _test_cls_triangulation_2( const Triangulation & )
/****************************/
/***** CONSTRUCTORS (2) *****/
cout << " constructors (2)" << endl;
std::cout << " constructors (2)" << std::endl;
// test copy_constructor with non-empty 0-triangulation
Cls T0_1_1( T0_1 );
@ -373,7 +368,7 @@ _test_cls_triangulation_2( const Triangulation & )
/*********************************************/
/****** FINITE/INFINITE VERTICES/FACES *******/
cout << " finite/infinite vertices/faces" << endl;
std::cout << " finite/infinite vertices/faces" << std::endl;
_test_fct_is_infinite( T0_0 );
_test_fct_is_infinite( T0_1 );
_test_fct_is_infinite( T1_2 );
@ -393,7 +388,7 @@ _test_cls_triangulation_2( const Triangulation & )
// No need because of precondition (at least two vertices)
// Check point location in 1-dimensional triangulations
cout << " point locations 1-dim" << endl;
std::cout << " point locations 1-dim" << std::endl;
Cls T1_3_2;
T1_3_2.insert(p1);
T1_3_2.insert(p2);
@ -419,7 +414,7 @@ _test_cls_triangulation_2( const Triangulation & )
// Check point location in 2-dimensional triangulations
cout << " point locations 2-dim" << endl;
std::cout << " point locations 2-dim" << std::endl;
f = T2_1.locate(p0,lt,li); assert( lt == Cls::VERTEX );
assert( T2_1.geom_traits().compare(f->vertex(li)->point(), p0) );
f = T2_1.locate(p1,lt,li); assert( lt == Cls::VERTEX );
@ -496,7 +491,7 @@ _test_cls_triangulation_2( const Triangulation & )
/*************************/
/******* Iterators *******/
cout << " iterators" << endl;
std::cout << " iterators" << std::endl;
_test_iterators(T0_0);
_test_iterators(T0_1);
_test_iterators(T1_2);
@ -512,7 +507,7 @@ _test_cls_triangulation_2( const Triangulation & )
/***************************/
/******* Circulators *******/
cout << " circulators" << endl;
std::cout << " circulators" << std::endl;
_test_circulators(T0_0);
_test_circulators(T0_1);
_test_circulators(T1_2);
@ -527,7 +522,7 @@ _test_cls_triangulation_2( const Triangulation & )
_test_circulators(T2_7);
// Line_face_circulator
cout << " line face circulator " << endl;
std::cout << " line face circulator " << std::endl;
typedef typename Cls::Line_face_circulator LFC;
// here == operator needed for Point!
// testing with the grid triangulation
@ -579,7 +574,7 @@ _test_cls_triangulation_2( const Triangulation & )
/*****************************/
/******** Miscellaneaous *****/
cout << " misc." << endl;
std::cout << " misc." << std::endl;
assert( T0_0.ccw(0) == 1 );
assert( T0_0.ccw(1) == 2 );
assert( T0_0.ccw(2) == 0 );
@ -605,69 +600,69 @@ _test_cls_triangulation_2( const Triangulation & )
/********************/
/******** I/O *******/
cout << " output to a file" << endl;
ofstream of0_0("T00.triangulation", ios::out);
std::cout << " output to a file" << std::endl;
std::ofstream of0_0("T00.triangulation", ios::out);
CGAL::set_ascii_mode(of0_0);
of0_0 << T0_0; of0_0.close();
ofstream of0_1("T01.triangulation");
std::ofstream of0_1("T01.triangulation");
CGAL::set_ascii_mode(of0_1);
of0_1 << T0_1; of0_1.close();
ofstream of1_2("T12.triangulation");
std::ofstream of1_2("T12.triangulation");
CGAL::set_ascii_mode(of1_2);
of1_2 << T1_2; of1_2.close();
ofstream of1_5("T15.triangulation");
std::ofstream of1_5("T15.triangulation");
CGAL::set_ascii_mode(of1_5);
of1_5 << T1_5; of1_5.close();
ofstream of1_6("T16.triangulation");
std::ofstream of1_6("T16.triangulation");
CGAL::set_ascii_mode(of1_6);
of1_6 << T1_6; of1_6.close();
ofstream of2_1("T21.triangulation");
std::ofstream of2_1("T21.triangulation");
CGAL::set_ascii_mode(of2_1);
of2_1 << T2_1; of2_1.close();
ofstream of2_3("T23.triangulation");
std::ofstream of2_3("T23.triangulation");
CGAL::set_ascii_mode(of2_3);
of2_3 << T2_3; of2_3.close();
ofstream of2_5("T25.triangulation");
std::ofstream of2_5("T25.triangulation");
CGAL::set_ascii_mode(of2_5);
of2_5 << T2_5; of2_5.close();
ofstream of2_6("T26.triangulation");
std::ofstream of2_6("T26.triangulation");
CGAL::set_ascii_mode(of2_6);
of2_6 << T2_6; of2_6.close();
cout << " input from a file" << endl;
ifstream if0_0("T00.triangulation"); CGAL::set_ascii_mode(if0_0);
std::cout << " input from a file" << std::endl;
std::ifstream if0_0("T00.triangulation"); CGAL::set_ascii_mode(if0_0);
Cls T0_0_copy; if0_0 >> T0_0_copy;
assert( T0_0_copy.is_valid() &&
T0_0_copy.number_of_vertices() == T0_0.number_of_vertices() );
ifstream if0_1("T01.triangulation"); CGAL::set_ascii_mode(if0_1);
std::ifstream if0_1("T01.triangulation"); CGAL::set_ascii_mode(if0_1);
Cls T0_1_copy; if0_1 >> T0_1_copy;
assert( T0_1_copy.is_valid() &&
T0_1_copy.number_of_vertices() == T0_1.number_of_vertices() );
ifstream if1_2("T12.triangulation"); CGAL::set_ascii_mode(if1_2);
std::ifstream if1_2("T12.triangulation"); CGAL::set_ascii_mode(if1_2);
Cls T1_2_copy; if1_2 >> T1_2_copy;
assert( T1_2_copy.is_valid() &&
T1_2_copy.number_of_vertices() == T1_2.number_of_vertices() );
ifstream if1_5("T15.triangulation"); CGAL::set_ascii_mode(if1_5);
std::ifstream if1_5("T15.triangulation"); CGAL::set_ascii_mode(if1_5);
Cls T1_5_copy; if1_5 >> T1_5_copy;
assert( T1_5_copy.is_valid() &&
T1_5_copy.number_of_vertices() == T1_5.number_of_vertices() );
ifstream if1_6("T16.triangulation"); CGAL::set_ascii_mode(if1_6);
std::ifstream if1_6("T16.triangulation"); CGAL::set_ascii_mode(if1_6);
Cls T1_6_copy; if1_6 >> T1_6_copy;
assert( T1_6_copy.is_valid() &&
T1_6_copy.number_of_vertices() == T1_6.number_of_vertices() );
ifstream if2_1("T21.triangulation"); CGAL::set_ascii_mode(if2_1);
std::ifstream if2_1("T21.triangulation"); CGAL::set_ascii_mode(if2_1);
Cls T2_1_copy; if2_1 >> T2_1_copy;
assert( T2_1_copy.is_valid() &&
T2_1_copy.number_of_vertices() == T2_1.number_of_vertices() );
ifstream if2_3("T23.triangulation"); CGAL::set_ascii_mode(if2_3);
std::ifstream if2_3("T23.triangulation"); CGAL::set_ascii_mode(if2_3);
Cls T2_3_copy; if2_3 >> T2_3_copy;
assert( T2_3_copy.is_valid() &&
T2_3_copy.number_of_vertices() == T2_3.number_of_vertices() );
ifstream if2_5("T25.triangulation"); CGAL::set_ascii_mode(if2_5);
std::ifstream if2_5("T25.triangulation"); CGAL::set_ascii_mode(if2_5);
Cls T2_5_copy; if2_5 >> T2_5_copy;
assert( T2_5_copy.is_valid() &&
T2_5_copy.number_of_vertices() == T2_5.number_of_vertices() );
ifstream if2_6("T26.triangulation"); CGAL::set_ascii_mode(if2_6);
std::ifstream if2_6("T26.triangulation"); CGAL::set_ascii_mode(if2_6);
Cls T2_6_copy; if2_6 >> T2_6_copy;
assert( T2_6_copy.is_valid() &&
T2_6_copy.number_of_vertices() == T2_6.number_of_vertices() );
@ -676,7 +671,7 @@ _test_cls_triangulation_2( const Triangulation & )
/**********************/
/***** REMOVALS *******/
cout << " removals" << endl;
std::cout << " removals" << std::endl;
// // test remove_first()
// T0_1.remove_first(T0_1.finite_vertex());
@ -748,5 +743,5 @@ _test_cls_triangulation_2( const Triangulation & )
assert( T2_7.number_of_vertices() == 0 );
// test destructors and return
cout << " test destructors and return" << endl;
std::cout << " test destructors and return" << std::endl;
}

View File

@ -27,7 +27,7 @@ template <class Face>
void
_test_cls_triangulation_face( const Face & )
{
cout << " face" << endl;
std::cout << " face" << std::endl;
typedef typename Face::Geom_traits Gt;
typedef typename Face::Point Point;

View File

@ -27,7 +27,7 @@ template <class Vertex>
void
_test_cls_triangulation_vertex( const Vertex & )
{
cout << " vertex" << endl;
std::cout << " vertex" << std::endl;
typedef typename Vertex::Geom_traits Gt;

View File

@ -28,7 +28,7 @@ _test_iterators( const Triangulation &T )
int nv = _test_cls_vertex_iterator(T);
int ne = _test_cls_edge_iterator(T);
int nf = _test_cls_face_iterator(T);
// cout << "Euler's relation: " << nv -ne + nf << endl;
// std::cout << "Euler's relation: " << nv -ne + nf << std::endl;
switch (T.dimension()) {
case 0 :
case -1 : assert( nv == T.number_of_vertices() && ne == 0 && nf == 0);

View File

@ -33,9 +33,9 @@
int main()
{
cout << "Testing constrained_triangulation "<< endl;
cout << " with Triangulation_test_traits : " << endl;
cout << " this uses double type coordinates " << endl;
std::cout << "Testing constrained_triangulation "<< endl;
std::cout << " with Triangulation_test_traits : " << endl;
std::cout << " this uses double type coordinates " << endl;
typedef CGAL::_Triangulation_test_traits Gt;
typedef CGAL::Triangulation_vertex_base_2<Gt> Vb;
typedef CGAL::Constrained_triangulation_face_base_2<Gt> CFb;

View File

@ -35,8 +35,8 @@
int main()
{
cout << "Testing Delaunay Triangulation_2 ";
cout << " with Euclidean cartesian points : " << endl;
std::cout << "Testing Delaunay Triangulation_2 ";
std::cout << " with Euclidean cartesian points : " << endl;
// typedef double coord_type;
// typedef CGAL::Cartesian<coord_type> Rep;
@ -50,8 +50,8 @@ int main()
_test_cls_delaunay_triangulation_2( Cls1() );
// cout << "Testing Delaunay Triangulation_2 ";
//cout << " with Euclidean homogeneous points : " << endl;
std::cout << "Testing Delaunay Triangulation_2 ";
std::cout << " with Euclidean homogeneous points : " << endl;
typedef CGAL::Triangulation_euclidean_traits_2<Test_rep_homogeneous> Gt2;
typedef CGAL::Triangulation_vertex_base_2<Gt2> Vb2;
@ -62,8 +62,8 @@ int main()
_test_cls_delaunay_triangulation_2( Cls2() );
cout << "Testing Delaunay Triangulation_2 ";
cout << " with Triangulation_test_traits : " << endl;
std::cout << "Testing Delaunay Triangulation_2 ";
std::cout << " with Triangulation_test_traits : " << endl;
typedef CGAL::_Triangulation_test_traits Gt;
typedef CGAL::Triangulation_vertex_base_2<Gt> Vb;

View File

@ -36,9 +36,9 @@
int main()
{
cout << "Testing Regular_triangulation_2" <<endl;
cout << " with CGAL::Regular_triangulation_euclidean_traits_2 : "<<endl;
cout << "using Cartesian points " << endl;
std::cout << "Testing Regular_triangulation_2" <<endl;
std::cout << " with CGAL::Regular_triangulation_euclidean_traits_2 : "<<endl;
std::cout << "using Cartesian points " << endl;
typedef CGAL::Regular_triangulation_euclidean_traits_2
<Test_rep_cartesian, Ftype> RGt;
@ -49,9 +49,9 @@ int main()
_test_cls_reg_triangulation_2( RCls() );
cout << "Testing Regular_triangulation_2" <<endl;
cout << " with CGAL::Regular_triangulation_euclidean_traits_2 : "<<endl;
cout << "using Homogeneous points "<< endl;
std::cout << "Testing Regular_triangulation_2" <<endl;
std::cout << " with CGAL::Regular_triangulation_euclidean_traits_2 : "<<endl;
std::cout << "using Homogeneous points "<< endl;
typedef CGAL::Regular_triangulation_euclidean_traits_2
<Test_rep_homogeneous, Rtype> RGt2;
typedef CGAL::Triangulation_vertex_base_2<RGt2> RVb2;

View File

@ -38,8 +38,8 @@
int main()
{
cout << "Testing Triangulation_2 " << std::endl;
cout << " with Euclidean_traits_2<Cartesian> : " << std::endl ;
std::cout << "Testing Triangulation_2 " << std::endl;
std::cout << " with Euclidean_traits_2<Cartesian> : " << std::endl ;
typedef CGAL::Triangulation_euclidean_traits_2<Test_rep_cartesian> Gt1;
typedef CGAL::Triangulation_vertex_base_2<Gt1> Vb1;
typedef CGAL::Triangulation_face_base_2<Gt1> Fb1;
@ -48,8 +48,8 @@ int main()
_test_cls_triangulation_2( Cls1() );
cout << std::endl << "Testing Triangulation_2 " <<std::endl;
cout << " with Euclidean_traits_2<Homogeneous> : " << std::endl ;
std::cout << std::endl << "Testing Triangulation_2 " <<std::endl;
std::cout << " with Euclidean_traits_2<Homogeneous> : " << std::endl ;
typedef CGAL::Triangulation_euclidean_traits_2<Test_rep_homogeneous> Gt3;
typedef CGAL::Triangulation_vertex_base_2<Gt3> Vb3;
typedef CGAL::Triangulation_face_base_2<Gt3> Fb3;
@ -58,9 +58,9 @@ int main()
_test_cls_triangulation_2( Cls3() );
cout << std::endl << "Testing Triangulation_2" <<std::endl;
cout << " with Triangulation_test_traits : " << std::endl;
cout << " this use double type coordinates " << std::endl;
std::cout << std::endl << "Testing Triangulation_2" <<std::endl;
std::cout << " with Triangulation_test_traits : " << std::endl;
std::cout << " this use double type coordinates " << std::endl;
typedef CGAL::_Triangulation_test_traits Gt2;
typedef CGAL::Triangulation_vertex_base_2<Gt2> Vb2;
typedef CGAL::Triangulation_face_base_2<Gt2> Fb2;

View File

@ -33,9 +33,9 @@
int
main()
{
cout << "Testing Triangulation_euclidean_traits_2" << endl;
std::cout << "Testing Triangulation_euclidean_traits_2" << endl;
cout << " with Cartesian" << endl;
std::cout << " with Cartesian" << endl;
typedef CGAL::Triangulation_euclidean_traits_2<Test_rep_cartesian> Cls1;
typedef Cls1::Point Pt1;
Pt1 p1[34] = {
@ -51,7 +51,7 @@ main()
Pt1(91,312), Pt1(125,300), Pt1(204,253), Pt1(0,0)
};
_test_cls_delaunay_geom_traits( p1, Cls1() );
cout << " with Homogeneous" << endl;
std::cout << " with Homogeneous" << endl;
typedef CGAL::Triangulation_euclidean_traits_2<Test_rep_homogeneous> Cls2;
typedef Cls2::Point Pt2;
Pt2 p2[34] = {
@ -68,9 +68,9 @@ main()
};
_test_cls_delaunay_geom_traits( p2, Cls2() );
cout << "Testing Triangulation_euclidean_traits_xy_3" << endl;
std::cout << "Testing Triangulation_euclidean_traits_xy_3" << endl;
cout << " with Cartesian" << endl;
std::cout << " with Cartesian" << endl;
typedef CGAL::Triangulation_euclidean_traits_xy_3<Test_rep_cartesian> Cls3;
typedef Cls3::Point Pt3;
Pt3 p3[34] = {
@ -86,7 +86,7 @@ main()
Pt3(91,312,5), Pt3(125,300,5), Pt3(204,253,5), Pt3(0,0,5)
};
_test_cls_geom_traits( p3, Cls3() );
cout << " with Homogeneous" << endl;
std::cout << " with Homogeneous" << endl;
typedef CGAL::Triangulation_euclidean_traits_xy_3<Test_rep_homogeneous> Cls4;
typedef Cls4::Point Pt4;
Pt4 p4[34] = {
@ -103,9 +103,9 @@ main()
};
_test_cls_geom_traits( p4, Cls4() );
cout << "Testing Triangulation_euclidean_traits_yz_3" << endl;
std::cout << "Testing Triangulation_euclidean_traits_yz_3" << endl;
cout << " with Cartesian" << endl;
std::cout << " with Cartesian" << endl;
typedef CGAL::Triangulation_euclidean_traits_yz_3<Test_rep_cartesian> Cls5;
typedef Cls5::Point Pt5;
Pt5 p5[34] = {
@ -121,7 +121,7 @@ main()
Pt5(1,91,312), Pt5(1,125,300), Pt5(1,204,253), Pt5(1,0,0)
};
_test_cls_geom_traits( p5, Cls5() );
cout << " with Homogeneous" << endl;
std::cout << " with Homogeneous" << endl;
typedef CGAL::Triangulation_euclidean_traits_yz_3<Test_rep_homogeneous> Cls6;
typedef Cls6::Point Pt6;
Pt6 p6[34] = {
@ -138,9 +138,9 @@ main()
};
_test_cls_geom_traits( p6, Cls6() );
cout << "Testing Triangulation_euclidean_traits_xz_3" << endl;
std::cout << "Testing Triangulation_euclidean_traits_xz_3" << endl;
cout << " with Cartesian" << endl;
std::cout << " with Cartesian" << endl;
typedef CGAL::Triangulation_euclidean_traits_xz_3<Test_rep_cartesian> Cls7;
typedef Cls7::Point Pt7;
Pt7 p7[34] = {
@ -156,7 +156,7 @@ main()
Pt7(91,3,312), Pt7(125,3,300), Pt7(204,3,253), Pt7(0,23,0)
};
_test_cls_geom_traits( p7, Cls7() );
cout << " with Homogeneous" << endl;
std::cout << " with Homogeneous" << endl;
typedef CGAL::Triangulation_euclidean_traits_xz_3<Test_rep_homogeneous> Cls8;
typedef Cls8::Point Pt8;
Pt8 p8[34] = {
@ -173,7 +173,7 @@ main()
};
_test_cls_geom_traits( p8, Cls8() );
cout << "Testing Triangulation_test_traits for the requirements" << endl;
std::cout << "Testing Triangulation_test_traits for the requirements" << endl;
typedef CGAL::_Triangulation_test_traits Cls9;
typedef Cls9::Point Pt9;
Pt9 p9[34] = {

View File

@ -34,7 +34,7 @@ int
main()
{
cout << "Testing Triangulation_defaut_data_structure_2" << endl;
std::cout << "Testing Triangulation_defaut_data_structure_2" << endl;
typedef CGAL::_Triangulation_test_traits Gt;
typedef CGAL::Triangulation_vertex_base_2<Gt> Vb;
typedef CGAL::Triangulation_face_base_2<Gt> Fb;