|
@@ -3,4 +3,20 @@
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#define CATCH_CONFIG_MAIN
|
|
#define CATCH_CONFIG_MAIN
|
|
|
-#include <catch2/catch.hpp>
|
|
|
|
|
|
|
+#include <catch2/catch.hpp>
|
|
|
|
|
+
|
|
|
|
|
+#ifndef NDEBUG
|
|
|
|
|
+#ifdef __linux__
|
|
|
|
|
+#include <fenv.h>
|
|
|
|
|
+#endif
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
|
|
+#ifndef NDEBUG
|
|
|
|
|
+#ifdef __linux__
|
|
|
|
|
+void beforeMain (void) __attribute__((constructor));
|
|
|
|
|
+void beforeMain (void)
|
|
|
|
|
+{
|
|
|
|
|
+ feenableexcept(FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW);
|
|
|
|
|
+}
|
|
|
|
|
+#endif
|
|
|
|
|
+#endif
|