Skip to content

Commit

Permalink
Test opencascade/stl_write: disable floating point exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
tamiko committed Jul 22, 2024
1 parent 952e069 commit f28163d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/opencascade/stl_write.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f28163d

Please sign in to comment.