Skip to content

Commit d23f856

Browse files
committed
[libc][math][c23] Add MPFR unit test for f16sqrtf
1 parent 232b431 commit d23f856

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
@@ -1979,6 +1979,19 @@ add_fp_unittest(
19791979
libc.src.math.f16sqrt
19801980
)
19811981

1982+
add_fp_unittest(
1983+
f16sqrtf_test
1984+
NEED_MPFR
1985+
SUITE
1986+
libc-math-unittests
1987+
SRCS
1988+
f16sqrtf_test.cpp
1989+
HDRS
1990+
SqrtTest.h
1991+
DEPENDS
1992+
libc.src.math.f16sqrtf
1993+
)
1994+
19821995
add_fp_unittest(
19831996
f16sqrtl_test
19841997
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)