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

via libc-commits libc-commits at lists.llvm.org
Sat Jul 13 21:27:54 PDT 2024


================
@@ -1,20 +1,16 @@
-//===-- Utility class to test the isnan macro [f|l] -------------*- C++ -*-===//
+//===-- 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 nanormation.
+// See https://llvm.org/LICENSE.txt for license information.
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_LIBC_TEST_INCLUDE_MATH_ISNAN_H
-#define LLVM_LIBC_TEST_INCLUDE_MATH_ISNAN_H
-
 #include "test/UnitTest/FPMatcher.h"
 #include "test/UnitTest/Test.h"
 
-#include "include/llvm-libc-macros/math-function-macros.h"
-
-template <typename T> class IsNanTest : public LIBC_NAMESPACE::testing::Test {
+template <typename T>
+class IsNanTest : public LIBC_NAMESPACE::testing::FPTest<T> {
 
   DECLARE_SPECIAL_CONSTANTS(T)
----------------
lntue wrote:

with `FPTest<T>` you don't need to add `DECLARE_SPECIAL_CONSTANTS(T)`: https://github.com/llvm/llvm-project/blob/main/libc/test/UnitTest/FPMatcher.h#L70

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


More information about the libc-commits mailing list