Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/web/release-notes-3.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ assign(ctx, f | as_scalar, f2 | as_scalar);

# Issues fixed

## Issue 255: Fix `InvokeTest` on `MacOS`

For more details, see <https://github.com/thelfer/MFrontGenericInterfaceSupport/issues/255>

## Issue 250: Add `ErrorBacktrace::assertOrTerminate`

For more details, see <https://github.com/thelfer/MFrontGenericInterfaceSupport/issues/250>
Expand Down
30 changes: 16 additions & 14 deletions tests/InvokeTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,22 @@ struct InvokeTest final : public tfel::tests::TestCase {
void test3() {
using namespace mgis;
Context ctx;
const auto r1 =
invokeCheckErrno(ctx, static_cast<double (*)(double)>(std::log), 1);
TFEL_TESTS_ASSERT(r1.has_value());
TFEL_TESTS_ASSERT(std::abs(*r1) < 1e-14);
const auto r2 =
invokeCheckErrno(ctx, static_cast<double (*)(double)>(std::log), -1);
TFEL_TESTS_ASSERT(!r2.has_value());
const auto r3 = MGIS_INVOKE_CHECK_ERRNO(
ctx, static_cast<double (*)(double)>(std::log), 1);
TFEL_TESTS_ASSERT(r3.has_value());
TFEL_TESTS_ASSERT(std::abs(*r3) < 1e-14);
const auto r4 = MGIS_INVOKE_CHECK_ERRNO(
ctx, static_cast<double (*)(double)>(std::log), -1);
TFEL_TESTS_ASSERT(!r4.has_value());
if (math_errhandling & MATH_ERRNO) {
const auto r1 =
invokeCheckErrno(ctx, static_cast<double (*)(double)>(std::log), 1);
TFEL_TESTS_ASSERT(r1.has_value());
TFEL_TESTS_ASSERT(std::abs(*r1) < 1e-14);
const auto r2 =
invokeCheckErrno(ctx, static_cast<double (*)(double)>(std::log), -1);
TFEL_TESTS_ASSERT(!r2.has_value());
const auto r3 = MGIS_INVOKE_CHECK_ERRNO(
ctx, static_cast<double (*)(double)>(std::log), 1);
TFEL_TESTS_ASSERT(r3.has_value());
TFEL_TESTS_ASSERT(std::abs(*r3) < 1e-14);
const auto r4 = MGIS_INVOKE_CHECK_ERRNO(
ctx, static_cast<double (*)(double)>(std::log), -1);
TFEL_TESTS_ASSERT(!r4.has_value());
}
} // end of test3
}; // end of InvokeTest

Expand Down
Loading