[libc-commits] [libc] [libc][math] implement `signbit` (PR #97791)

via libc-commits libc-commits at lists.llvm.org
Mon Jul 8 00:06:41 PDT 2024


================
@@ -79,3 +79,163 @@ add_libc_test(
   DEPENDS
     libc.include.llvm-libc-macros.stdckdint_macros
 )
+
+add_libc_test(
+  signbit_test
+  SUITE
+    libc_include_tests
+  SRCS
+    signbit_test.cpp
+  DEPENDS
+    libc.include.llvm-libc-macros.math_function_macros
+  LINK_LIBRARIES
+    LibcFPTestHelpers
+)
+
+add_libc_test(
+  signbitf_test
+  SUITE
+    libc_include_tests
+  SRCS
+    signbitf_test.cpp
+  DEPENDS
+    libc.include.llvm-libc-macros.math_function_macros
+  LINK_LIBRARIES
+    LibcFPTestHelpers
+)
+
+add_libc_test(
+  signbitl_test
+  SUITE
+    libc_include_tests
+  SRCS
+    signbitl_test.cpp
+  DEPENDS
+    libc.include.llvm-libc-macros.math_function_macros
+  LINK_LIBRARIES
+    LibcFPTestHelpers
+)
+
+add_libc_test(
+  isnan_test
+  SUITE
+    libc_include_tests
+  SRCS
+    isnan_test.cpp
+  DEPENDS
+    libc.include.llvm-libc-macros.math_function_macros
+  LINK_LIBRARIES
+    LibcFPTestHelpers
+)
+
+add_libc_test(
+  isnanf_test
+  SUITE
+    libc_include_tests
+  SRCS
+    isnanf_test.cpp
+  DEPENDS
+    libc.include.llvm-libc-macros.math_function_macros
+  LINK_LIBRARIES
+    LibcFPTestHelpers
+)
+
+add_libc_test(
+  isnanl_test
+  SUITE
+    libc_include_tests
+  SRCS
+    isnanl_test.cpp
+  DEPENDS
+    libc.include.llvm-libc-macros.math_function_macros
+  LINK_LIBRARIES
+    LibcFPTestHelpers
+)
+
+add_libc_test(
+  isinf_test
+  SUITE
+    libc_include_tests
+  SRCS
+    isinf_test.cpp
+  DEPENDS
+    libc.include.llvm-libc-macros.math_function_macros
+  LINK_LIBRARIES
+    LibcFPTestHelpers
+)
+
+add_libc_test(
+  isinff_test
+  SUITE
+    libc_include_tests
+  SRCS
+    isinff_test.cpp
+  DEPENDS
+    libc.include.llvm-libc-macros.math_function_macros
+  LINK_LIBRARIES
+    LibcFPTestHelpers
+)
+
+add_libc_test(
+  isinfl_test
+  SUITE
+    libc_include_tests
+  SRCS
+    isinfl_test.cpp
+  DEPENDS
+    libc.include.llvm-libc-macros.math_function_macros
+  LINK_LIBRARIES
+    LibcFPTestHelpers
+)
+
+add_libc_test(
+  isfinite_test
+  SUITE
+    libc_include_tests
+  SRCS
+    isfinite_test.cpp
+  DEPENDS
+    libc.include.llvm-libc-macros.math_function_macros
+  LINK_LIBRARIES
+    LibcFPTestHelpers
+)
+
+add_libc_test(
+  isfinitef_test
+  SUITE
+    libc_include_tests
+  SRCS
+    isfinitef_test.cpp
+  DEPENDS
+    libc.include.llvm-libc-macros.math_function_macros
+  LINK_LIBRARIES
+    LibcFPTestHelpers
+)
+
+add_libc_test(
+  isfinitel_test
+  SUITE
+    libc_include_tests
+  SRCS
+    isfinitel_test.cpp
+  DEPENDS
+    libc.include.llvm-libc-macros.math_function_macros
+  LINK_LIBRARIES
+    LibcFPTestHelpers
+)
----------------
akielaries wrote:

@lntue Also curious on if this is the right approach for testing these macros. I mostly used the testing for `fabs` as a reference

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


More information about the libc-commits mailing list