]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Test opencascade/stl_write: disable floating point exceptions 17348/head
authorMatthias Maier <tamiko@43-1.org>
Mon, 22 Jul 2024 14:35:01 +0000 (09:35 -0500)
committerMatthias Maier <tamiko@43-1.org>
Mon, 22 Jul 2024 14:35:01 +0000 (09:35 -0500)
tests/opencascade/stl_write.cc

index 0d2aaca868b02ad284a523fd3068035320c523d7..1234efa2c59a1d55bec9c380b9967f35cfd6e155 100644 (file)
@@ -29,6 +29,16 @@ using namespace OpenCASCADE;
 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();
   TopoDS_Shape sh = read_STL(SOURCE_DIR "/stl_files/sphere_refined.stl");
   write_STL(sh, "tmp.stl", 0.001, false, 1e-6, false, 0.001, false);

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.