mirror of https://github.com/CGAL/cgal
Flush before std::exit (otherwise nothing is printed)
This commit is contained in:
parent
5a7204decb
commit
6f90060e7d
|
|
@ -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<
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ void test_reference_tetrahedron(const char* fname)
|
|||
CGAL::Surface_mesh<Point_3> 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<Point_3> 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<Point_3> 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<Point_3> 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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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<edge_descriptor> 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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue