[libc-commits] [libc] [libc][math][c23] Add MPFR unit test for f16sqrtf (PR #97062)
via libc-commits
libc-commits at lists.llvm.org
Mon Jul 1 03:27:55 PDT 2024
https://github.com/overmighty updated https://github.com/llvm/llvm-project/pull/97062
>From ef38799e85f2bb980527dbaa65b64f4808663fcb Mon Sep 17 00:00:00 2001
From: OverMighty <its.overmighty at gmail.com>
Date: Fri, 28 Jun 2024 16:31:43 +0200
Subject: [PATCH] [libc][math][c23] Add MPFR unit test for f16sqrtf
---
libc/test/src/math/CMakeLists.txt | 13 +++++++++++++
libc/test/src/math/f16sqrtf_test.cpp | 13 +++++++++++++
2 files changed, 26 insertions(+)
create mode 100644 libc/test/src/math/f16sqrtf_test.cpp
diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt
index 1326d0830d7d9..6336905e0ebcf 100644
--- a/libc/test/src/math/CMakeLists.txt
+++ b/libc/test/src/math/CMakeLists.txt
@@ -2005,6 +2005,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