Skip to content

Commit 01f8fba

Browse files
committed
ECKIT-350 ECKIT-359 Modernise FP exception handling (more demanding)
1 parent eae31c4 commit 01f8fba

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tests/types/test_doublecompare.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
#include <cmath>
12+
#include <limits>
1213

1314
#include "eckit/maths/FloatingPointExceptions.h"
1415
#include "eckit/types/FloatCompare.h"
@@ -332,5 +333,6 @@ CASE("test_comparisons_ulps") {
332333
//----------------------------------------------------------------------------------------------------------------------
333334

334335
int main(int argc, char** argv) {
336+
eckit::maths::FloatingPointExceptions::enable_floating_point_exceptions();
335337
return eckit::testing::run_tests(argc, argv);
336338
}

tests/types/test_floatcompare.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010

1111
#include <cmath>
12+
#include <limits>
1213

1314
#include "eckit/maths/FloatingPointExceptions.h"
1415
#include "eckit/types/FloatCompare.h"
@@ -332,5 +333,6 @@ CASE("test_comparisons_ulps") {
332333
//----------------------------------------------------------------------------------------------------------------------
333334

334335
int main(int argc, char** argv) {
336+
eckit::maths::FloatingPointExceptions::enable_floating_point_exceptions();
335337
return eckit::testing::run_tests(argc, argv);
336338
}

0 commit comments

Comments
 (0)