# This file is licensed 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
# Smoke tests for LLVM libc math.h functions.
load("//libc:libc_build_rules.bzl", "libc_support_library")
load("//libc/test/src/math:libc_math_test_rules.bzl", "math_test")
package(default_visibility = ["//visibility:public"])
licenses(["notice"])
math_test(
name = "fabsf128",
hdrs = ["FAbsTest.h"],
)
math_test(
name = "ceilf128",
hdrs = ["CeilTest.h"],
)
math_test(
name = "cospif",
)
math_test(
name = "floorf128",
hdrs = ["FloorTest.h"],
)
math_test(
name = "truncf128",
hdrs = ["TruncTest.h"],
)
math_test(
name = "roundf128",
hdrs = ["RoundTest.h"],
)
math_test(
name = "frexpf128",
hdrs = ["FrexpTest.h"],
)
math_test(
name = "logbf128",
hdrs = ["LogbTest.h"],
)
math_test(
name = "modff128",
hdrs = ["ModfTest.h"],
)
math_test(
name = "fminf128",
hdrs = ["FMinTest.h"],
)
math_test(
name = "fmaxf128",
hdrs = ["FMaxTest.h"],
)
math_test(
name = "sqrtf128",
hdrs = ["SqrtTest.h"],
deps = ["//libc:__support_cpp_bit"],
)
math_test(
name = "copysignf128",
hdrs = ["CopySignTest.h"],
)
math_test(
name = "ilogbf128",
hdrs = ["ILogbTest.h"],
deps = ["//libc:__support_cpp_limits"],
)
math_test(
name = "fdimf128",
hdrs = ["FDimTest.h"],
)
libc_support_library(
name = "ldexp_test_template",
hdrs = ["LdExpTest.h"],
deps = [
"//libc:__support_cpp_limits",
"//libc:__support_fputil_fp_bits",
"//libc:__support_fputil_normal_float",
"//libc:hdr_math_macros",
"//libc/test/UnitTest:LibcUnitTest",
"//libc/test/UnitTest:fp_test_helpers",
],
)
math_test(
name = "ldexpf128",
hdrs = ["LdExpTest.h"],
deps = ["//libc:__support_cpp_limits"],
)
math_test(
name = "rintf128",
hdrs = ["RIntTest.h"],
deps = ["//libc:hdr_fenv_macros"],
)
math_test(
name = "lrintf128",
hdrs = ["RoundToIntegerTest.h"],
)
math_test(
name = "llrintf128",
hdrs = ["RoundToIntegerTest.h"],
)
math_test(
name = "lroundf128",
hdrs = ["RoundToIntegerTest.h"],
)
math_test(
name = "llroundf128",
hdrs = ["RoundToIntegerTest.h"],
)
libc_support_library(
name = "nextafter_test_template",
hdrs = ["NextAfterTest.h"],
deps = [
"//libc:__support_cpp_array",
"//libc:__support_cpp_bit",
"//libc:__support_cpp_type_traits",
"//libc:__support_fputil_basic_operations",
"//libc:__support_fputil_fenv_impl",
"//libc:__support_fputil_fp_bits",
"//libc:hdr_fenv_macros",
"//libc:hdr_math_macros",
"//libc/test/UnitTest:LibcUnitTest",
"//libc/test/UnitTest:fp_test_helpers",
],
)
math_test(
name = "nextafterf128",
deps = [":nextafter_test_template"],
)