From 6f90060e7d00b4487a353d94e45b7c7f5cf3696a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 24 Mar 2020 11:37:55 +0100 Subject: [PATCH] Flush before std::exit (otherwise nothing is printed) --- .../test/Convex_hull_3/test_extreme_points.cpp | 4 ++-- .../benchmarks/Optimal_bounding_box/bench_obb.cpp | 2 +- .../test_optimization_algorithms.cpp | 10 +++++----- .../manifoldness_repair_example.cpp | 2 +- .../surface_mesh_intersection.cpp | 4 ++-- .../remove_degeneracies_test.cpp | 4 ++-- .../surface_intersection_sm_poly.cpp | 4 ++-- .../Polygon_mesh_processing/test_pmp_manifoldness.cpp | 2 +- .../Polygon_mesh_processing/test_shape_predicates.cpp | 6 +++--- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Convex_hull_3/test/Convex_hull_3/test_extreme_points.cpp b/Convex_hull_3/test/Convex_hull_3/test_extreme_points.cpp index 9b9ee278cbb..29d7e632570 100644 --- a/Convex_hull_3/test/Convex_hull_3/test_extreme_points.cpp +++ b/Convex_hull_3/test/Convex_hull_3/test_extreme_points.cpp @@ -52,7 +52,7 @@ void test_triangulated_cube(const char* fname) std::ifstream input(fname); SurfaceMesh mesh; if (!input || !(input >> mesh) || mesh.is_empty()) { - std::cerr << fname << " is not a valid off file.\n"; + std::cerr << fname << " is not a valid off file." << std::endl; exit(1); } @@ -206,7 +206,7 @@ void test_extreme_vertices(const char* fname) std::ifstream input(fname); Polyhedron_3 P; if (!input || !(input >> P) || P.is_empty()) { - std::cerr << fname << " is not a valid off file.\n"; + std::cerr << fname << " is not a valid off file." << std::endl; exit(1); } /*CGAL::Extreme_points_traits_adapter_3< diff --git a/Optimal_bounding_box/benchmarks/Optimal_bounding_box/bench_obb.cpp b/Optimal_bounding_box/benchmarks/Optimal_bounding_box/bench_obb.cpp index b6d1e3a5d6a..88a2146467f 100644 --- a/Optimal_bounding_box/benchmarks/Optimal_bounding_box/bench_obb.cpp +++ b/Optimal_bounding_box/benchmarks/Optimal_bounding_box/bench_obb.cpp @@ -30,7 +30,7 @@ void bench_finding_obb(const std::string fname) Surface_mesh mesh; if (!input || !(input >> mesh) || mesh.is_empty()) { - std::cerr << fname << " is not a valid off file.\n"; + std::cerr << fname << " is not a valid off file." << std::endl; std::exit(1); } diff --git a/Optimal_bounding_box/test/Optimal_bounding_box/test_optimization_algorithms.cpp b/Optimal_bounding_box/test/Optimal_bounding_box/test_optimization_algorithms.cpp index 1dbdc081967..488530965ad 100644 --- a/Optimal_bounding_box/test/Optimal_bounding_box/test_optimization_algorithms.cpp +++ b/Optimal_bounding_box/test/Optimal_bounding_box/test_optimization_algorithms.cpp @@ -89,7 +89,7 @@ void test_reference_tetrahedron(const char* fname) CGAL::Surface_mesh mesh; if(!input || !(input >> mesh) || mesh.is_empty()) { - std::cerr << fname << " is not a valid off file.\n"; + std::cerr << fname << " is not a valid off file." << std::endl; std::exit(1); } @@ -112,7 +112,7 @@ void test_long_tetrahedron(const std::string fname) CGAL::Surface_mesh mesh; if(!input || !(input >> mesh) || mesh.is_empty()) { - std::cerr << fname << " is not a valid off file.\n"; + std::cerr << fname << " is not a valid off file." << std::endl; std::exit(1); } @@ -145,7 +145,7 @@ void test_compute_obb_evolution(const std::string fname) SMesh mesh; if(!input || !(input >> mesh) || mesh.is_empty()) { - std::cerr << fname << " is not a valid off file.\n"; + std::cerr << fname << " is not a valid off file." << std::endl; std::exit(1); } @@ -174,7 +174,7 @@ void test_compute_obb_mesh(const std::string fname) CGAL::Surface_mesh mesh; if(!input || !(input >> mesh) || mesh.is_empty()) { - std::cerr << fname << " is not a valid off file.\n"; + std::cerr << fname << " is not a valid off file." << std::endl; std::exit(1); } @@ -194,7 +194,7 @@ void test_function_defaults_traits(const std::string fname1) CGAL::Surface_mesh mesh1; if(!input1 || !(input1 >> mesh1) || mesh1.is_empty()) { - std::cerr << fname1 << " is not a valid off file.\n"; + std::cerr << fname1 << " is not a valid off file." << std::endl; std::exit(1); } diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/manifoldness_repair_example.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/manifoldness_repair_example.cpp index 61d8b46bfe4..876de531c29 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/manifoldness_repair_example.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/manifoldness_repair_example.cpp @@ -39,7 +39,7 @@ int main(int argc, char* argv[]) Mesh mesh; if(!input || !(input >> mesh) || num_vertices(mesh) == 0) { - std::cerr << filename << " is not a valid off file.\n"; + std::cerr << filename << " is not a valid off file." << std::endl; return EXIT_FAILURE; } diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/surface_mesh_intersection.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/surface_mesh_intersection.cpp index 20ccbf2da0f..01c5a7d65b7 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/surface_mesh_intersection.cpp +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/surface_mesh_intersection.cpp @@ -24,7 +24,7 @@ int main(int argc, char* argv[]) Mesh mesh1; if ( !input || !(input >> mesh1) ) { - std::cerr << filename1 << " is not a valid off file.\n"; + std::cerr << filename1 << " is not a valid off file." << std::endl; return 1; } input.close(); @@ -34,7 +34,7 @@ int main(int argc, char* argv[]) Mesh mesh2; if ( !input || !(input >> mesh2) ) { - std::cerr << filename2 << " is not a valid off file.\n"; + std::cerr << filename2 << " is not a valid off file." << std::endl; return 1; } diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/remove_degeneracies_test.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/remove_degeneracies_test.cpp index f18dda38b1e..ac372682ca6 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/remove_degeneracies_test.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/remove_degeneracies_test.cpp @@ -137,7 +137,7 @@ void remove_degeneracies(const char* filename, Mesh mesh; if (!input || !(input >> mesh) || mesh.is_empty()) { - std::cerr << filename << " is not a valid off file.\n"; + std::cerr << filename << " is not a valid off file." << std::endl; exit(1); } @@ -211,7 +211,7 @@ void remove_negligible_connected_components(const char* filename) Mesh mesh, mesh_cpy; if (!input || !(input >> mesh) || mesh.is_empty()) { - std::cerr << filename << " is not a valid off file.\n"; + std::cerr << filename << " is not a valid off file." << std::endl; exit(1); } diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/surface_intersection_sm_poly.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/surface_intersection_sm_poly.cpp index 154b56bd6d4..6dbbcccb152 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/surface_intersection_sm_poly.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/surface_intersection_sm_poly.cpp @@ -28,13 +28,13 @@ void run(const char* filename1, const char* filename2, const char* msg) { TriangleMesh mesh1; if ( !CGAL::read_off(filename1, mesh1) ) { - std::cerr << filename1 << " is not a valid off file.\n"; + std::cerr << filename1 << " is not a valid off file." << std::endl; exit(1); } TriangleMesh mesh2; if ( !CGAL::read_off(filename2, mesh2) ) { - std::cerr << filename2 << " is not a valid off file.\n"; + std::cerr << filename2 << " is not a valid off file." << std::endl; exit(1); } diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_manifoldness.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_manifoldness.cpp index c4b8a98d2fa..6ba9b17e466 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_manifoldness.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_pmp_manifoldness.cpp @@ -25,7 +25,7 @@ void read_mesh(const char* fname, std::ifstream input(fname); if (!input || !(input >> mesh) || mesh.is_empty()) { - std::cerr << fname << " is not a valid off file.\n"; + std::cerr << fname << " is not a valid off file." << std::endl; std::exit(1); } } diff --git a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_shape_predicates.cpp b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_shape_predicates.cpp index 2f4c275e29d..d1315704637 100644 --- a/Polygon_mesh_processing/test/Polygon_mesh_processing/test_shape_predicates.cpp +++ b/Polygon_mesh_processing/test/Polygon_mesh_processing/test_shape_predicates.cpp @@ -24,7 +24,7 @@ void check_edge_degeneracy(const char* fname) std::ifstream input(fname); Surface_mesh mesh; if (!input || !(input >> mesh) || mesh.is_empty()) { - std::cerr << fname << " is not a valid off file.\n"; + std::cerr << fname << " is not a valid off file." << std::endl; std::exit(1); } std::vector all_edges(edges(mesh).begin(), edges(mesh).end()); @@ -44,7 +44,7 @@ void check_triangle_face_degeneracy(const char* fname) std::ifstream input(fname); Surface_mesh mesh; if (!input || !(input >> mesh) || mesh.is_empty()) { - std::cerr << fname << " is not a valid off file.\n"; + std::cerr << fname << " is not a valid off file." << std::endl; std::exit(1); } @@ -70,7 +70,7 @@ void test_needles_and_caps(const char* fname) std::ifstream input(fname); Surface_mesh mesh; if (!input || !(input >> mesh) || mesh.is_empty()) { - std::cerr << fname << " is not a valid off file.\n"; + std::cerr << fname << " is not a valid off file." << std::endl; std::exit(1); }