[libc][NFC] Use more specific comparison macros in LdExpTest.h.

This commit is contained in:
Siva Chandra Reddy 2021-01-12 16:11:28 -08:00
parent 04edcc0263
commit 0c8466c001
1 changed files with 2 additions and 2 deletions

View File

@ -131,11 +131,11 @@ public:
// The result should not be infinity. // The result should not be infinity.
x = NormalFloat(-FPBits::exponentBias + 1, NormalFloat::one >> 10, 0); x = NormalFloat(-FPBits::exponentBias + 1, NormalFloat::one >> 10, 0);
exp = FPBits::maxExponent + 5; exp = FPBits::maxExponent + 5;
ASSERT_EQ(isinf(func(x, exp)), 0); ASSERT_FALSE(FPBits(func(x, exp)).isInf());
// But if the exp is large enough to oversome than the normalization shift, // But if the exp is large enough to oversome than the normalization shift,
// then it should result in infinity. // then it should result in infinity.
exp = FPBits::maxExponent + 15; exp = FPBits::maxExponent + 15;
ASSERT_NE(isinf(func(x, exp)), 0); ASSERT_FP_EQ(func(x, exp), inf);
} }
}; };