Skip to content

Commit a3f700a

Browse files
authored
[libc][math][c23] Add MPFR unit test for f16sqrtf (#97062)
1 parent 44a2589 commit a3f700a

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

libc/test/src/math/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,6 +2065,19 @@ add_fp_unittest(
20652065
libc.src.math.f16sqrt
20662066
)
20672067

2068+
add_fp_unittest(
2069+
f16sqrtf_test
2070+
NEED_MPFR
2071+
SUITE
2072+
libc-math-unittests
2073+
SRCS
2074+
f16sqrtf_test.cpp
2075+
HDRS
2076+
SqrtTest.h
2077+
DEPENDS
2078+
libc.src.math.f16sqrtf
2079+
)
2080+
20682081
add_fp_unittest(
20692082
f16sqrtl_test
20702083
NEED_MPFR

libc/test/src/math/f16sqrtf_test.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//===-- Unittests for f16sqrtf --------------------------------------------===//
2+
//
3+
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
// See https://llvm.org/LICENSE.txt for license information.
5+
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
//
7+
//===----------------------------------------------------------------------===//
8+
9+
#include "SqrtTest.h"
10+
11+
#include "src/math/f16sqrtf.h"
12+
13+
LIST_NARROWING_SQRT_TESTS(float16, float, LIBC_NAMESPACE::f16sqrtf)

0 commit comments

Comments
 (0)