Skip to content

Commit 0d55e45

Browse files
committed
timer for the tests
1 parent 618df45 commit 0d55e45

26 files changed

+106
-20
lines changed

Mesh_3/test/Mesh_3/test_c3t3.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include <CGAL/Polyhedron_3.h>
3636
#include <CGAL/IO/File_medit.h>
3737
#include <CGAL/IO/File_tetgen.h>
38+
#include <CGAL/Real_timer.h>
3839

3940

4041

@@ -377,6 +378,7 @@ struct Tester
377378

378379
int main()
379380
{
381+
CGAL::Real_timer timer; timer.start();
380382
std::cerr << "TESTING WITH Exact_predicates_inexact_constructions_kernel...\n";
381383
Tester<K_e_i> test_epic;
382384
test_epic();
@@ -385,5 +387,6 @@ int main()
385387
Tester<K_e_e> test_epec;
386388
test_epec();
387389

390+
std::cout << timer.time() << "sec" << std::endl;
388391
return EXIT_SUCCESS;
389392
}

Mesh_3/test/Mesh_3/test_c3t3_extract_subdomains_boundaries.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
#include <CGAL/make_mesh_3.h>
1010

1111
#include <sstream>
12+
#include <iostream>
13+
14+
#include <CGAL/Real_timer.h>
1215

1316
using namespace CGAL::parameters;
1417

@@ -60,6 +63,7 @@ typedef Mesh_criteria::Cell_criteria Cell_criteria;
6063

6164
int main()
6265
{
66+
CGAL::Real_timer timer; timer.start();
6367
// Define functions
6468
Function f1(&torus_function);
6569
Function f2(&sphere_function<3>);
@@ -93,5 +97,6 @@ int main()
9397
assert( off_file.str().size() > 20 );
9498
}
9599

100+
std::cout << timer.time() << "sec" << std::endl;
96101
return 0;
97102
}

Mesh_3/test/Mesh_3/test_c3t3_into_facegraph.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
77
#include <CGAL/Mesh_3/tet_soup_to_c3t3.h>
88
#include <CGAL/Mesh_3/Robust_intersection_traits_3.h>
99
#include <CGAL/Polyhedral_mesh_domain_with_features_3.h>
10+
#include <CGAL/Real_timer.h>
1011

1112
#include <CGAL/tags.h>
1213

1314
#include <iostream>
1415
#include <fstream>
1516

1617
int main (int argc, char** argv){
18+
CGAL::Real_timer timer; timer.start();
1719
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
1820
typedef CGAL::Polyhedral_mesh_domain_with_features_3<K> Polyhedral_mesh_domain;
1921

@@ -90,5 +92,6 @@ int main (int argc, char** argv){
9092
out << poly;
9193

9294
CGAL_assertion(is_valid(poly));
95+
std::cout << timer.time() << "sec" << std::endl;
9396
return EXIT_SUCCESS;
9497
}

Mesh_3/test/Mesh_3/test_c3t3_io.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
#include <CGAL/Mesh_triangulation_3.h>
44
#include <CGAL/Mesh_complex_3_in_triangulation_3.h>
55
#include <CGAL/IO/File_binary_mesh_3.h>
6+
#include <CGAL/Real_timer.h>
67

78
#include <boost/variant.hpp>
89

910
#include <string>
11+
#include <iostream>
1012

1113
#include <CGAL/disable_warnings.h>
1214

@@ -450,14 +452,17 @@ struct Test_c3t3_io {
450452

451453
int main()
452454
{
455+
CGAL::Real_timer timer; timer.start();
453456
std::cout << "First test I/O when all indices are integers" << std::endl;
454457
bool ok = Test_c3t3_io<MD_homogeneous_types>()("data/c3t3_io-homo");
458+
std::cout << timer.time() << "sec" << std::endl;
455459
if(!ok) {
456460
std::cerr << "Error\n";
457461
return -1;
458462
}
459463
std::cout << "Then test I/O when all indices are different types" << std::endl;
460464
ok = Test_c3t3_io<MD_heterogeneous_types>()("data/c3t3_io-hetero");
465+
std::cout << timer.time() << "sec" << std::endl;
461466
if(!ok) {
462467
std::cerr << "Error\n";
463468
return -1;

Mesh_3/test/Mesh_3/test_c3t3_with_features.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <fstream>
3535
#include <iostream>
3636
#include <CGAL/IO/File_medit.h>
37+
#include <CGAL/Real_timer.h>
3738

3839

3940

@@ -365,8 +366,10 @@ struct Tester
365366

366367
int main()
367368
{
369+
CGAL::Real_timer timer; timer.start();
368370
Tester<K_e_i> test_epic;
369371
test_epic();
370372

373+
std::cout << timer.time() << "sec" << std::endl;
371374
return EXIT_SUCCESS;
372375
}

Mesh_3/test/Mesh_3/test_criteria.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <CGAL/Polyhedron_3.h>
3333

3434
#include <CGAL/Mesh_criteria_3.h>
35+
#include <CGAL/Real_timer.h>
3536

3637
#include <string>
3738
#include <iostream>
@@ -349,6 +350,7 @@ struct Tester
349350

350351
int main()
351352
{
353+
CGAL::Real_timer timer; timer.start();
352354
std::cerr << "TESTING WITH Exact_predicates_inexact_constructions_kernel...\n";
353355
Tester<K_e_i> test_epic;
354356
test_epic.test_cell();
@@ -359,5 +361,6 @@ int main()
359361
test_epec.test_cell();
360362
test_epec.test_facet();
361363

364+
std::cout << timer.time() << "sec" << std::endl;
362365
return EXIT_SUCCESS;
363366
}

Mesh_3/test/Mesh_3/test_domain_with_polyline_features.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
#include <vector>
3030
#include <list>
3131
#include <utility>
32+
#include <iostream>
33+
#include <CGAL/Real_timer.h>
3234

3335
template <typename K>
3436
struct Dummy_domain
@@ -236,6 +238,7 @@ class Domain_with_polyline_tester
236238

237239
int main()
238240
{
241+
CGAL::Real_timer timer; timer.start();
239242
std::cout << "Test corners" << std::endl;
240243
Domain_with_polyline_tester domain_corner_tester;
241244
domain_corner_tester.build_corners();
@@ -257,5 +260,6 @@ int main()
257260
domain_cycle_tester.test_cycles();
258261
domain_cycle_tester.test_geodesic_distance();
259262

263+
std::cout << timer.time() << "sec" << std::endl;
260264
return EXIT_SUCCESS;
261265
}

Mesh_3/test/Mesh_3/test_implicit_multi_domain_to_labeling_function_wrapper.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
22
#include <CGAL/Implicit_to_labeling_function_wrapper.h>
3-
3+
#include <iostream>
4+
#include <CGAL/Real_timer.h>
45

56
typedef CGAL::Exact_predicates_inexact_constructions_kernel K_e_i;
67
typedef K_e_i::Point_3 Point_3;
@@ -132,10 +133,12 @@ void test_constructor_vfunc_vstr ()
132133
assert(rp2 != rp3);
133134
}
134135

135-
int main ()
136+
int main()
136137
{
138+
CGAL::Real_timer timer; timer.start();
137139
test_constructor_vfunc();
138140
test_constructor_vfunc_vvpos();
139141
test_constructor_vfunc_vstr();
142+
std::cout << timer.time() << "sec" << std::endl;
140143
return 0;
141144
}

Mesh_3/test/Mesh_3/test_labeled_mesh_domain_3.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
#include "test_meshing_utilities.h"
2727
#include <CGAL/Labeled_mesh_domain_3.h>
2828
#include <CGAL/Implicit_to_labeling_function_wrapper.h>
29-
29+
#include <iostream>
30+
#include <CGAL/Real_timer.h>
3031

3132
template <typename K>
3233
struct LM3_tester
@@ -265,8 +266,10 @@ struct LM3_tester
265266

266267
int main ()
267268
{
269+
CGAL::Real_timer timer; timer.start();
268270
LM3_tester<K_e_i> test_epic;
269271
test_epic();
270272

273+
std::cout << timer.time() << "sec" << std::endl;
271274
return EXIT_SUCCESS;
272275
}

Mesh_3/test/Mesh_3/test_mesh_3_issue_1554.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
#include <CGAL/make_mesh_3.h>
1313

1414
#include <fstream>
15-
15+
#include <iostream>
16+
#include <CGAL/Real_timer.h>
1617
// Domain
1718
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
1819
typedef CGAL::Mesh_polyhedron_3<K>::type Polyhedron;
@@ -52,6 +53,7 @@ Tr::Bare_point wc_circumcenter(const Tr& tr,
5253

5354
int main(int argc, char*argv[])
5455
{
56+
CGAL::Real_timer timer; timer.start();
5557
const char* fname = (argc>1)?argv[1]:"data/fandisk.off";
5658
// Create domain
5759
std::ifstream in(fname);
@@ -106,5 +108,6 @@ int main(int argc, char*argv[])
106108
}
107109
std::cout << c3t3.triangulation().number_of_vertices() << std::endl;
108110
// Output
111+
std::cout << timer.time() << "sec" << std::endl;
109112
return return_code;
110113
}

0 commit comments

Comments
 (0)