From f28163dc79a248907048a415fc65bc146e1038ab Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Mon, 22 Jul 2024 09:35:01 -0500 Subject: [PATCH] Test opencascade/stl_write: disable floating point exceptions --- tests/opencascade/stl_write.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/opencascade/stl_write.cc b/tests/opencascade/stl_write.cc index 0d2aaca868..1234efa2c5 100644 --- a/tests/opencascade/stl_write.cc +++ b/tests/opencascade/stl_write.cc @@ -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); -- 2.39.5