diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/fairing_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/fairing_test.cpp index b8065484507..7dd04b55727 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/fairing_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/fairing_test.cpp @@ -34,13 +34,13 @@ void test(const char* filename) } //try to fair the mesh - std::size_t nbv = std::distance(vertices(poly).first - , vertices(poly).second); + CGAL_assertion_code(std::size_t nbv = + std::distance(vertices(poly).first, vertices(poly).second)); CGAL::Polygon_mesh_processing::fair(poly, vertices(poly)); - std::size_t nbv2 = std::distance(vertices(poly).first - , vertices(poly).second); + CGAL_assertion_code(std::size_t nbv2 = + std::distance(vertices(poly).first, vertices(poly).second)); CGAL_assertion(nbv == nbv2); diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/orient_polygon_mesh_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/orient_polygon_mesh_test.cpp index fa023b0e301..f27719cba52 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/orient_polygon_mesh_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/orient_polygon_mesh_test.cpp @@ -28,13 +28,11 @@ void test(const char* file_name) CGAL_assertion(false); } - bool before = CGAL::Polygon_mesh_processing::is_outward_oriented(poly); - CGAL_assertion(before); + CGAL_assertion(CGAL::Polygon_mesh_processing::is_outward_oriented(poly)); CGAL::Polygon_mesh_processing::reverse_face_orientations(poly); - bool after = CGAL::Polygon_mesh_processing::is_outward_oriented(poly); - CGAL_assertion(!after); + CGAL_assertion(!CGAL::Polygon_mesh_processing::is_outward_oriented(poly)); std::cerr << "Polyhedron "<< file_name << " passed the test." << std::endl; poly.clear(); //empty memory @@ -48,13 +46,12 @@ void test(const char* file_name) std::cerr << "Error: cannot read Surface_mesh : " << file_name << "\n"; CGAL_assertion(false); } - before = CGAL::Polygon_mesh_processing::is_outward_oriented(mesh); - CGAL_assertion(before); + + CGAL_assertion(CGAL::Polygon_mesh_processing::is_outward_oriented(mesh)); CGAL::Polygon_mesh_processing::reverse_face_orientations(mesh); - after = CGAL::Polygon_mesh_processing::is_outward_oriented(mesh); - CGAL_assertion(!after); + CGAL_assertion(!CGAL::Polygon_mesh_processing::is_outward_oriented(mesh)); std::cerr << "Surface_mesh " << file_name << " passed the test." << std::endl; } diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/self_intersection_polyhedron_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/self_intersection_polyhedron_test.cpp index 1e6c645666f..ab4fa7d36ce 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/self_intersection_polyhedron_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/self_intersection_polyhedron_test.cpp @@ -33,17 +33,17 @@ int main(int argc, char** argv) (poly, std::back_inserter(intersected_tris), CGAL::Polygon_mesh_processing::parameters::vertex_index_map(get(CGAL::vertex_point, poly))); - bool intersecting_1 = !intersected_tris.empty(); + CGAL_assertion_code(bool intersecting_1 = !intersected_tris.empty()); CGAL_assertion(!intersecting_1); std::cerr << "Self-intersection test took " << timer.time() << " sec." << std::endl; std::cerr << intersected_tris.size() << " pairs of triangles intersect." << std::endl; timer.reset(); - bool intersecting_2 - = CGAL::Polygon_mesh_processing::does_self_intersect(poly, - CGAL::Polygon_mesh_processing::parameters::vertex_index_map(get(CGAL::vertex_point, poly))); - + CGAL_assertion_code(bool intersecting_2 = + CGAL::Polygon_mesh_processing::does_self_intersect(poly, + CGAL::Polygon_mesh_processing::parameters::vertex_index_map(get(CGAL::vertex_point, poly)))); + CGAL_assertion(intersecting_1 == intersecting_2); std::cerr << "does_self_intersect test took " << timer.time() << " sec." << std::endl;