]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Test cgal/cgal_triangulation_06: disable floating point exceptions 15462/head
authorMatthias Maier <tamiko@43-1.org>
Fri, 23 Jun 2023 22:26:52 +0000 (17:26 -0500)
committerMatthias Maier <tamiko@43-1.org>
Fri, 23 Jun 2023 22:26:52 +0000 (17:26 -0500)
Otherwise this test might trigger a spurious floating point exception
depending on the CGAL library version being used.

tests/cgal/cgal_triangulation_06.cc

index 9be5c04034870ad4349ffa019ce2a626a45bceff..517d3902ddc979b9d4e380b94da5c125eb286ffd 100644 (file)
@@ -45,6 +45,16 @@ using C3t3          = CGAL::Mesh_complex_3_in_triangulation_3<Tr>;
 int
 main()
 {
+  // 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
+
   initlog();
   // Build a deal.II triangulation
   CGAL::Surface_mesh<CGALPoint> cgal_surface_mesh;

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.