summaryrefslogtreecommitdiff
path: root/libc/test/include/isinff_test.cpp
diff options
context:
space:
mode:
authorAkiel <56521583+akielaries@users.noreply.github.com>2024-07-13 20:01:36 -0700
committerGitHub <noreply@github.com>2024-07-13 23:01:36 -0400
commit3604c23dfc8edb00aae72456ef3ff765eb795db5 (patch)
tree3ce38b0e4cdf38af93cb745db7a5235b75be2271 /libc/test/include/isinff_test.cpp
parent8b4251729f267b136414c359394daab0492f0c0c (diff)
[libc][math] implement `signbit` and math macro unit tests (#97791)
This PR resolves #96322 and implements the `signbit` macro under a new header `generic-math-macros.h`. This also removed the `TODO` in `math-macros.h` and moves `isfinite`, `isinf`, and `isnan` to the same generic maths header. Finally, a test file `generic-math-macros_test.cpp` that adds coverage to the above 4 macros. Fixes #96322.
Diffstat (limited to 'libc/test/include/isinff_test.cpp')
-rw-r--r--libc/test/include/isinff_test.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/libc/test/include/isinff_test.cpp b/libc/test/include/isinff_test.cpp
new file mode 100644
index 000000000000..a2170c766bf6
--- /dev/null
+++ b/libc/test/include/isinff_test.cpp
@@ -0,0 +1,12 @@
+//===-- Unittest for isinf[f] macro ---------------------------------------===//
+//
+// 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 "IsInfTest.h"
+#include "include/llvm-libc-macros/math-function-macros.h"
+
+LIST_ISINF_TESTS(float, isinf)