Skip to content

Commit aff22ed

Browse files
committed
correct treatment of math errors
1 parent 3f94cfe commit aff22ed

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

tests/LoadMaterialPropertyTest.cxx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,16 +279,19 @@ static void test7(const std::string& library) {
279279
"invalid output status ('" + std::to_string(s.status) + "')");
280280
check(std::abs(E - std::acos(T)) < eps, "invalid output value");
281281
}
282-
#ifndef __INTEL_LLVM_COMPILER
283282
{
284283
constexpr auto T = real{-2};
285284
auto s = OutputStatus{};
286285
s.status = 2;
287286
mp.fct(&s, &T, 1, op);
288-
check(s.status == -3,
289-
"invalid output status ('" + std::to_string(s.status) + "')");
287+
if constexpr (math_errhandling & MATH_ERRNO) {
288+
check(s.status == -3,
289+
"invalid output status ('" + std::to_string(s.status) + "')");
290+
} else {
291+
check(s.status == 0,
292+
"invalid output status ('" + std::to_string(s.status) + "')");
293+
}
290294
}
291-
#endif /* __INTEL_LLVM_COMPILER */
292295
}
293296

294297
static void test8(const std::string& library) {

0 commit comments

Comments
 (0)