[libc-commits] [libc] [libc][math] Add MPFR unit tests for nearbyint{, f, l, f16} (PR #94479)

via libc-commits libc-commits at lists.llvm.org
Wed Jun 5 07:58:40 PDT 2024


================
@@ -131,7 +138,7 @@ class RIntTestTemplate : public LIBC_NAMESPACE::testing::FEnvSafeTest {
       for (int mode : ROUNDING_MODES) {
         LIBC_NAMESPACE::fputil::set_round(mode);
         mpfr::RoundingMode mpfr_mode = to_mpfr_rounding_mode(mode);
-        ASSERT_FP_EQ(func(x), mpfr::round(x, mpfr_mode));
+        EXPECT_FP_EQ(func(x), mpfr::round(x, mpfr_mode));
----------------
overmighty wrote:

Would it be worth it to also use `EXPECT_FP_EQ_WITH_EXCEPTION` here based on the mantissa of `x`/`xbits`?

https://github.com/llvm/llvm-project/pull/94479


More information about the libc-commits mailing list