[libc-commits] [libc] [libc][math] implement `signbit` and math macro unit tests (PR #97791)
via libc-commits
libc-commits at lists.llvm.org
Sat Jul 13 08:05:08 PDT 2024
================
@@ -0,0 +1,87 @@
+//===-- Unittests for generic-math-macros ---------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDSList-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "test/UnitTest/Test.h"
+
+/*
+ * The intent of this test is validate that the generic math macros operate as
+ * intended
+ */
+#include "include/llvm-libc-macros/generic-math-macros.h"
+
+// INF can be defined as a number with zeroed out mantissa and 1s in the
+// exponent
+static uint32_t pos_inf_bits = 0x7F800000;
----------------
lntue wrote:
I don't think linking against `LibcFPTestHelpers` is needed for you here, because you only use the header of that target, not doing anything with floating point environment or rounding modes.
https://github.com/llvm/llvm-project/pull/97791
More information about the libc-commits
mailing list