From b4eed5b64c971bdd20de9b9fc15cbc64cdc2a5b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 27 Apr 2017 11:53:03 +0200 Subject: [PATCH] Fixed test_RT_cell_base_with_weigh... and added it to the CMakeLists -Some wrong Bare_point/Weighted_point usage -Fully instantiate the Regular_triangulation_cell_base_with_weighted_circum... with all the template parameters of the regular cell base --- .../test/Triangulation_3/CMakeLists.txt | 1 + ...cell_base_with_weighted_circumcenter_3.cpp | 92 +++++++++---------- 2 files changed, 46 insertions(+), 47 deletions(-) diff --git a/Triangulation_3/test/Triangulation_3/CMakeLists.txt b/Triangulation_3/test/Triangulation_3/CMakeLists.txt index d1139a43c68..247a6b3256f 100644 --- a/Triangulation_3/test/Triangulation_3/CMakeLists.txt +++ b/Triangulation_3/test/Triangulation_3/CMakeLists.txt @@ -34,6 +34,7 @@ if ( CGAL_FOUND ) create_single_source_cgal_program( "test_regular_insert_range_with_info.cpp" ) create_single_source_cgal_program( "test_regular_remove_3.cpp" ) create_single_source_cgal_program( "test_regular_traits_3.cpp" ) + create_single_source_cgal_program( "test_RT_cell_base_with_weighted_circumcenter_3.cpp" ) create_single_source_cgal_program( "test_simplex_3.cpp" ) create_single_source_cgal_program( "test_static_filters.cpp" ) create_single_source_cgal_program( "test_triangulation_3.cpp" ) diff --git a/Triangulation_3/test/Triangulation_3/test_RT_cell_base_with_weighted_circumcenter_3.cpp b/Triangulation_3/test/Triangulation_3/test_RT_cell_base_with_weighted_circumcenter_3.cpp index 707fc00ff88..269cf2c15cb 100644 --- a/Triangulation_3/test/Triangulation_3/test_RT_cell_base_with_weighted_circumcenter_3.cpp +++ b/Triangulation_3/test/Triangulation_3/test_RT_cell_base_with_weighted_circumcenter_3.cpp @@ -29,32 +29,30 @@ #include - typedef CGAL::Exact_predicates_inexact_constructions_kernel K; -typedef CGAL::Regular_triangulation_vertex_base_3 Vb; -typedef CGAL::Triangulation_cell_base_3 Cb; +typedef CGAL::Regular_triangulation_vertex_base_3 Vb; +typedef CGAL::Triangulation_cell_base_3 Cb; typedef CGAL::Triangulation_data_structure_3 Tds; -typedef CGAL::Regular_triangulation_3 Regular_triangulation_3; +typedef CGAL::Regular_triangulation_3 Regular_triangulation_3; typedef CGAL::Regular_triangulation_cell_base_with_weighted_circumcenter_3::Rebind_TDS::Other Cell_type; -typedef Cell_type::Vertex_handle Vertex_handle; -typedef Cell_type::Cell_handle Cell_handle; -typedef Regular_triangulation_3::Weighted_point Weighted_point; -typedef Regular_triangulation_3::Point Point; -typedef Regular_triangulation_3::Bare_point Bare_point; +typedef Cell_type::Vertex_handle Vertex_handle; +typedef Cell_type::Cell_handle Cell_handle; +typedef Regular_triangulation_3::Bare_point Bare_point; +typedef Regular_triangulation_3::Point Point; +typedef Regular_triangulation_3::Weighted_point Weighted_point; // Explicit instantiation of the whole class. template class -CGAL::Regular_triangulation_cell_base_with_weighted_circumcenter_3 - > > >; - +CGAL::Regular_triangulation_cell_base_with_weighted_circumcenter_3< + K, CGAL::Regular_triangulation_cell_base_3< + K, CGAL::Triangulation_cell_base_3< + K, CGAL::Triangulation_ds_cell_base_3 >, + CGAL::Keep_hidden_points, std::vector > >; void test_default_constructor () { @@ -119,10 +117,10 @@ void test_constructor_2 () void test_weighted_circumcenter () { - Weighted_point p0(Point(0,0,0),1); - Weighted_point p1(Point(2,0,0),1); - Weighted_point p2(Point(0,2,0),1); - Weighted_point p3(Point(0,0,2),1); + Weighted_point p0(Bare_point(0,0,0),1); + Weighted_point p1(Bare_point(2,0,0),1); + Weighted_point p2(Bare_point(0,2,0),1); + Weighted_point p3(Bare_point(0,0,2),1); Tds::Vertex v0(p0), v1(p1), v2(p2), v3(p3); Tds tds; Vertex_handle vh0 = tds.create_vertex(v0); @@ -140,10 +138,10 @@ void test_weighted_circumcenter () void test_copy_constructor () { - Weighted_point p0(Point(0,0,0),1); - Weighted_point p1(Point(2,0,0),1); - Weighted_point p2(Point(0,2,0),1); - Weighted_point p3(Point(0,0,2),1); + Weighted_point p0(Bare_point(0,0,0),1); + Weighted_point p1(Bare_point(2,0,0),1); + Weighted_point p2(Bare_point(0,2,0),1); + Weighted_point p3(Bare_point(0,0,2),1); Tds::Vertex v0(p0), v1(p1), v2(p2), v3(p3); Tds::Cell c0, c1, c2, c3; Tds tds; @@ -176,10 +174,10 @@ void test_copy_constructor () void test_copy_constructor_2 () { - Weighted_point p0(Point(0,0,0),1); - Weighted_point p1(Point(2,0,0),1); - Weighted_point p2(Point(0,2,0),1); - Weighted_point p3(Point(0,0,2),1); + Weighted_point p0(Bare_point(0,0,0),1); + Weighted_point p1(Bare_point(2,0,0),1); + Weighted_point p2(Bare_point(0,2,0),1); + Weighted_point p3(Bare_point(0,0,2),1); Tds::Vertex v0(p0), v1(p1), v2(p2), v3(p3); Tds::Cell c0, c1, c2, c3; Tds tds; @@ -212,10 +210,10 @@ void test_copy_constructor_2 () void test_assignment_operator () { - Weighted_point p0(Point(0,0,0),1); - Weighted_point p1(Point(2,0,0),1); - Weighted_point p2(Point(0,2,0),1); - Weighted_point p3(Point(0,0,2),1); + Weighted_point p0(Bare_point(0,0,0),1); + Weighted_point p1(Bare_point(2,0,0),1); + Weighted_point p2(Bare_point(0,2,0),1); + Weighted_point p3(Bare_point(0,0,2),1); Tds::Vertex v0(p0), v1(p1), v2(p2), v3(p3); Tds::Cell c0, c1, c2, c3; Tds tds; @@ -249,10 +247,10 @@ void test_assignment_operator () void test_assignment_operator_2 () { - Weighted_point p0(Point(0,0,0),1); - Weighted_point p1(Point(2,0,0),1); - Weighted_point p2(Point(0,2,0),1); - Weighted_point p3(Point(0,0,2),1); + Weighted_point p0(Bare_point(0,0,0),1); + Weighted_point p1(Bare_point(2,0,0),1); + Weighted_point p2(Bare_point(0,2,0),1); + Weighted_point p3(Bare_point(0,0,2),1); Tds::Vertex v0(p0), v1(p1), v2(p2), v3(p3); Tds::Cell c0, c1, c2, c3; Tds tds; @@ -286,10 +284,10 @@ void test_assignment_operator_2 () void test_set_vertex () { - Weighted_point p0(Point(0,0,0),1); - Weighted_point p1(Point(2,0,0),1); - Weighted_point p2(Point(0,2,0),1); - Weighted_point p3(Point(0,0,2),1); + Weighted_point p0(Bare_point(0,0,0),1); + Weighted_point p1(Bare_point(2,0,0),1); + Weighted_point p2(Bare_point(0,2,0),1); + Weighted_point p3(Bare_point(0,0,2),1); Tds::Vertex v0(p0), v1(p1), v2(p2), v3(p3); Tds tds; Vertex_handle vh0 = tds.create_vertex(v0); @@ -312,10 +310,10 @@ void test_set_vertex () void test_set_vertices () { - Weighted_point p0(Point(0,0,0),1); - Weighted_point p1(Point(2,0,0),1); - Weighted_point p2(Point(0,2,0),1); - Weighted_point p3(Point(0,0,2),1); + Weighted_point p0(Bare_point(0,0,0),1); + Weighted_point p1(Bare_point(2,0,0),1); + Weighted_point p2(Bare_point(0,2,0),1); + Weighted_point p3(Bare_point(0,0,2),1); Tds::Vertex v0(p0), v1(p1), v2(p2), v3(p3); Tds tds; Vertex_handle vh0 = tds.create_vertex(v0); @@ -334,10 +332,10 @@ void test_set_vertices () void test_set_vertices_with_parameters () { - Weighted_point p0(Point(0,0,0),1); - Weighted_point p1(Point(2,0,0),1); - Weighted_point p2(Point(0,2,0),1); - Weighted_point p3(Point(0,0,2),1); + Weighted_point p0(Bare_point(0,0,0),1); + Weighted_point p1(Bare_point(2,0,0),1); + Weighted_point p2(Bare_point(0,2,0),1); + Weighted_point p3(Bare_point(0,0,2),1); Tds::Vertex v0(p0), v1(p1), v2(p2), v3(p3); Tds tds; Vertex_handle vh0 = tds.create_vertex(v0);