[libc-commits] [libc] 0c8466c - [libc][NFC] Use more specific comparison macros in LdExpTest.h.
Siva Chandra Reddy via libc-commits
libc-commits at lists.llvm.org
Tue Jan 12 16:13:49 PST 2021
Author: Siva Chandra Reddy
Date: 2021-01-12T16:13:10-08:00
New Revision: 0c8466c0015eb8e4061b177e125e588b2138cc8a
URL: https://github.com/llvm/llvm-project/commit/0c8466c0015eb8e4061b177e125e588b2138cc8a
DIFF: https://github.com/llvm/llvm-project/commit/0c8466c0015eb8e4061b177e125e588b2138cc8a.diff
LOG: [libc][NFC] Use more specific comparison macros in LdExpTest.h.
Added:
Modified:
libc/test/src/math/LdExpTest.h
Removed:
################################################################################
diff --git a/libc/test/src/math/LdExpTest.h b/libc/test/src/math/LdExpTest.h
index b4be06bdaad7..0a910bddb371 100644
--- a/libc/test/src/math/LdExpTest.h
+++ b/libc/test/src/math/LdExpTest.h
@@ -131,11 +131,11 @@ class LdExpTestTemplate : public __llvm_libc::testing::Test {
// The result should not be infinity.
x = NormalFloat(-FPBits::exponentBias + 1, NormalFloat::one >> 10, 0);
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,
// then it should result in infinity.
exp = FPBits::maxExponent + 15;
- ASSERT_NE(isinf(func(x, exp)), 0);
+ ASSERT_FP_EQ(func(x, exp), inf);
}
};
More information about the libc-commits
mailing list