aboutsummaryrefslogtreecommitdiff
path: root/libc/test/src/math
diff options
context:
space:
mode:
Diffstat (limited to 'libc/test/src/math')
-rw-r--r--libc/test/src/math/generic/CMakeLists.txt1
-rw-r--r--libc/test/src/math/smoke/CMakeLists.txt13
-rw-r--r--libc/test/src/math/smoke/fabsbf16_test.cpp14
3 files changed, 27 insertions, 1 deletions
diff --git a/libc/test/src/math/generic/CMakeLists.txt b/libc/test/src/math/generic/CMakeLists.txt
index 1fe7801..a9d54d6 100644
--- a/libc/test/src/math/generic/CMakeLists.txt
+++ b/libc/test/src/math/generic/CMakeLists.txt
@@ -30,4 +30,3 @@ add_fp_unittest(
DEPENDS
libc.src.math.generic.ceill
)
-
diff --git a/libc/test/src/math/smoke/CMakeLists.txt b/libc/test/src/math/smoke/CMakeLists.txt
index ec4c09c..40b7a342 100644
--- a/libc/test/src/math/smoke/CMakeLists.txt
+++ b/libc/test/src/math/smoke/CMakeLists.txt
@@ -221,6 +221,19 @@ add_fp_unittest(
)
add_fp_unittest(
+ fabsbf16_test
+ SUITE
+ libc-math-smoke-tests
+ SRCS
+ fabsbf16_test.cpp
+ HDRS
+ FAbsTest.h
+ DEPENDS
+ libc.src.__support.FPUtil.bfloat16
+ libc.src.math.fabsbf16
+)
+
+add_fp_unittest(
fadd_test
SUITE
libc-math-smoke-tests
diff --git a/libc/test/src/math/smoke/fabsbf16_test.cpp b/libc/test/src/math/smoke/fabsbf16_test.cpp
new file mode 100644
index 0000000..611050a
--- /dev/null
+++ b/libc/test/src/math/smoke/fabsbf16_test.cpp
@@ -0,0 +1,14 @@
+//===-- Unittests for fabsbf16 --------------------------------------------===//
+//
+// 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 "FAbsTest.h"
+
+#include "src/__support/FPUtil/bfloat16.h"
+#include "src/math/fabsbf16.h"
+
+LIST_FABS_TESTS(bfloat16, LIBC_NAMESPACE::fabsbf16)