From 1e7633d863984c8ada9707637e63b2d2a0141dcc Mon Sep 17 00:00:00 2001 From: Jane Tournois Date: Thu, 27 Mar 2014 10:41:17 +0100 Subject: [PATCH] add the display of the seed to make tests reproducible will be debugging --- Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp | 3 +++ Mesh_3/test/Mesh_3/test_meshing_determinism.cpp | 1 + Mesh_3/test/Mesh_3/test_meshing_implicit_function.cpp | 2 ++ Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp | 4 +++- Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp | 2 ++ Mesh_3/test/Mesh_3/test_meshing_polylines_only.cpp | 2 ++ 6 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp b/Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp index 7142ab5c280..3e640f0793f 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_3D_image.cpp @@ -50,6 +50,9 @@ public: //------------------------------------------------------- Image image; image.read("data/liver.inr.gz"); + + std::cout << "\tSeed is\t" + << CGAL::default_random.get_seed() << std::endl; Mesh_domain domain(image, 1e-9, &CGAL::default_random); // Set mesh criteria diff --git a/Mesh_3/test/Mesh_3/test_meshing_determinism.cpp b/Mesh_3/test/Mesh_3/test_meshing_determinism.cpp index bc35c7b3dd2..f6ad7af260c 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_determinism.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_determinism.cpp @@ -38,6 +38,7 @@ int main(int argc, char* argv[]) double exude_bound = 15.; // Domain + std::cout << "\tSeed is\t 0" << std::endl; Mesh_domain domain("data/cube.off"); //no random generator is given, so CGAL::Random(0) is used diff --git a/Mesh_3/test/Mesh_3/test_meshing_implicit_function.cpp b/Mesh_3/test/Mesh_3/test_meshing_implicit_function.cpp index 17ad2ecbb2a..362cc8b053e 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_implicit_function.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_implicit_function.cpp @@ -57,6 +57,8 @@ struct Implicit_tester : public Tester //------------------------------------------------------- // Data generation //------------------------------------------------------- + std::cout << "\tSeed is\t" + << CGAL::default_random.get_seed() << std::endl; Mesh_domain domain(Implicit_tester::sphere_function, Sphere_3(CGAL::ORIGIN,2.), 1e-3, diff --git a/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp b/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp index ccaad5e08f1..f7008010f34 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_polyhedron.cpp @@ -51,7 +51,9 @@ struct Polyhedron_tester : public Tester std::ifstream input("data/sphere.off"); input >> polyhedron; input.close(); - + + std::cout << "\tSeed is\t" + << CGAL::default_random.get_seed() << std::endl; Mesh_domain domain(polyhedron, &CGAL::default_random); // Set mesh criteria diff --git a/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp b/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp index d72dddca804..641e477f499 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_polyhedron_with_features.cpp @@ -51,6 +51,8 @@ struct Polyhedron_with_features_tester : public Tester //------------------------------------------------------- // Data generation //------------------------------------------------------- + std::cout << "\tSeed is\t" + << CGAL::default_random.get_seed() << std::endl; Mesh_domain domain("data/cube.off", &CGAL::default_random); domain.detect_features(); diff --git a/Mesh_3/test/Mesh_3/test_meshing_polylines_only.cpp b/Mesh_3/test/Mesh_3/test_meshing_polylines_only.cpp index d95332aede6..4b2a5ea7150 100644 --- a/Mesh_3/test/Mesh_3/test_meshing_polylines_only.cpp +++ b/Mesh_3/test/Mesh_3/test_meshing_polylines_only.cpp @@ -46,6 +46,8 @@ int main(int argc, char** argv) Point(0, 1, 0), Point(0, 0, 1)); + std::cout << "\tSeed is\t" + << CGAL::default_random.get_seed() << std::endl; Mesh_domain domain(p, &CGAL::default_random); typedef std::vector Polyline;