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

via libc-commits libc-commits at lists.llvm.org
Wed Jul 10 10:25:47 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:

You can inherit from `testing::FPTest<T>`, remove `DECLARE_SPECIAL_CONSTANTS(T)`, and `testSpecialCases`.

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


More information about the libc-commits mailing list