[llvm-branch-commits] [libc] cc07d52 - [libc][NFC] Use ASSERT_FP_EQ to compare nan values in tests.
Siva Chandra Reddy via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Dec 30 13:11:31 PST 2020
Author: Siva Chandra Reddy
Date: 2020-12-30T13:06:40-08:00
New Revision: cc07d5251144e12cc089748ec66af0423ba57ad1
URL: https://github.com/llvm/llvm-project/commit/cc07d5251144e12cc089748ec66af0423ba57ad1
DIFF: https://github.com/llvm/llvm-project/commit/cc07d5251144e12cc089748ec66af0423ba57ad1.diff
LOG: [libc][NFC] Use ASSERT_FP_EQ to compare nan values in tests.
This change "fixes" one of the uses that was missed in
0524da67b448dcce6569fae0f54c10f208c2dc56.
Added:
Modified:
libc/test/src/math/RemQuoTest.h
Removed:
################################################################################
diff --git a/libc/test/src/math/RemQuoTest.h b/libc/test/src/math/RemQuoTest.h
index 66f2f0956348..1e00ee14927e 100644
--- a/libc/test/src/math/RemQuoTest.h
+++ b/libc/test/src/math/RemQuoTest.h
@@ -123,7 +123,7 @@ class RemQuoTestTemplate : public __llvm_libc::testing::Test {
// In normal range on x86 platforms, the long double implicit 1 bit can be
// zero making the numbers NaN. Hence we test for them separately.
if (isnan(x) || isnan(y)) {
- ASSERT_NE(isnan(result.f), 0);
+ ASSERT_FP_EQ(result.f, nan);
continue;
}
More information about the llvm-branch-commits
mailing list