[libc][NFC] Set rounding mode for sincosf exhaustive test.
authorTue Ly <lntue@google.com>
Thu, 29 Jun 2023 00:30:54 +0000 (20:30 -0400)
committerTue Ly <lntue@google.com>
Thu, 29 Jun 2023 00:30:54 +0000 (20:30 -0400)
libc/test/src/math/exhaustive/sincosf_test.cpp

index dfc2228..1917924 100644 (file)
@@ -18,6 +18,9 @@ struct SincosfChecker : public virtual __llvm_libc::testing::Test {
   using UIntType = uint32_t;
 
   uint64_t check(UIntType start, UIntType stop, mpfr::RoundingMode rounding) {
+    mpfr::ForceRoundingMode r(rounding);
+    if (!r.success)
+      return (stop > start);
     UIntType bits = start;
     uint64_t failed = 0;
     do {