]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Test cgal/cgal_surface_mesh_02: disable floating point exceptions 15448/head
authorMatthias Maier <maier@tamu.edu>
Fri, 23 Jun 2023 04:35:58 +0000 (23:35 -0500)
committerMatthias Maier <tamiko@43-1.org>
Fri, 23 Jun 2023 04:39:46 +0000 (23:39 -0500)
Otherwise this test might trigger a spurious floating point exception
depending on the CGAL library version being used.

tests/cgal/cgal_surface_mesh_02.cc

index 764efd5b34f058de765c8e3e2c6a8bc0bf6013a1..222551ea50c94e60595dd0db655c90c507d6765e 100644 (file)
@@ -47,6 +47,16 @@ using C3t3          = CGAL::Mesh_complex_3_in_triangulation_3<Tr,
 void
 test()
 {
+  // This test might trigger spurious floating point exception despite
+  // functioning properly. Simply disable floating point exceptions again
+  // (after they had been enabled int tests.h)
+#if defined(DEBUG) && defined(DEAL_II_HAVE_FP_EXCEPTIONS)
+  {
+    const int current_fe_except = fegetexcept();
+    fedisableexcept(current_fe_except);
+  }
+#endif
+
   const std::vector<std::string> fnames{SOURCE_DIR "/input_grids/cube.off",
                                         SOURCE_DIR
                                         "/input_grids/tetrahedron.off"};

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.