[libc-commits] [libc] a3f700a - [libc][math][c23] Add MPFR unit test for f16sqrtf (#97062)

via libc-commits libc-commits at lists.llvm.org
Mon Jul 1 05:46:33 PDT 2024


Author: OverMighty
Date: 2024-07-01T08:46:29-04:00
New Revision: a3f700a3d6113d825dfef97bffa90827ab4149e8

URL: https://github.com/llvm/llvm-project/commit/a3f700a3d6113d825dfef97bffa90827ab4149e8
DIFF: https://github.com/llvm/llvm-project/commit/a3f700a3d6113d825dfef97bffa90827ab4149e8.diff

LOG: [libc][math][c23] Add MPFR unit test for f16sqrtf (#97062)

Added: 
    libc/test/src/math/f16sqrtf_test.cpp

Modified: 
    libc/test/src/math/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt
index 729d9feeaae8a..263bee65315f1 100644
--- a/libc/test/src/math/CMakeLists.txt
+++ b/libc/test/src/math/CMakeLists.txt
@@ -2065,6 +2065,19 @@ add_fp_unittest(
     libc.src.math.f16sqrt
 )
 
+add_fp_unittest(
+  f16sqrtf_test
+  NEED_MPFR
+  SUITE
+    libc-math-unittests
+  SRCS
+    f16sqrtf_test.cpp
+  HDRS
+    SqrtTest.h
+  DEPENDS
+    libc.src.math.f16sqrtf
+)
+
 add_fp_unittest(
   f16sqrtl_test
   NEED_MPFR

diff  --git a/libc/test/src/math/f16sqrtf_test.cpp b/libc/test/src/math/f16sqrtf_test.cpp
new file mode 100644
index 0000000000000..36231aeb4184d
--- /dev/null
+++ b/libc/test/src/math/f16sqrtf_test.cpp
@@ -0,0 +1,13 @@
+//===-- Unittests for f16sqrtf --------------------------------------------===//
+//
+// 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 "SqrtTest.h"
+
+#include "src/math/f16sqrtf.h"
+
+LIST_NARROWING_SQRT_TESTS(float16, float, LIBC_NAMESPACE::f16sqrtf)


        


More information about the libc-commits mailing list