[libc-commits] [libc] [libc] Unit test for isnan[f,l] (PR #98274)

via libc-commits libc-commits at lists.llvm.org
Sat Jul 13 22:15:12 PDT 2024


================
@@ -0,0 +1,53 @@
+//===-- Utility class to test isnan[f|l] ------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "test/UnitTest/FEnvSafeTest.h"
+#include "test/UnitTest/FPMatcher.h"
+#include "test/UnitTest/Test.h"
+
+template <typename T>
+class IsNanTest : public LIBC_NAMESPACE::testing::FEnvSafeTest {
----------------
lntue wrote:

This seems to fix the issue:
```
diff --git a/libc/test/src/math/IsNanTest.h b/libc/test/src/math/IsNanTest.h
index e281395f2cf4..6b55333cd608 100644
--- a/libc/test/src/math/IsNanTest.h
+++ b/libc/test/src/math/IsNanTest.h
@@ -10,7 +10,7 @@
 #include "test/UnitTest/Test.h"
 
 template <typename T>
-class IsNanTest : public LIBC_NAMESPACE::testing::FPTest<T> {
+class IsNanTest : public LIBC_NAMESPACE::testing::Test {
 
   DECLARE_SPECIAL_CONSTANTS(T)
```

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


More information about the libc-commits mailing list