llvm/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel

# 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

# Tests for LLVM libc math.h functions.

load("//libc/test/src/math:libc_math_test_rules.bzl", "math_mpfr_test")

package(default_visibility = ["//visibility:public"])

exports_files(["libc_math_test_rules.bzl"])

licenses(["notice"])

math_mpfr_test(name = "acosf")

math_mpfr_test(name = "acoshf")

math_mpfr_test(name = "asinf")

math_mpfr_test(name = "asinhf")

math_mpfr_test(name = "atan2")

math_mpfr_test(name = "atan2f")

math_mpfr_test(name = "atanf")

math_mpfr_test(name = "atanhf")

math_mpfr_test(name = "cbrt")

math_mpfr_test(name = "cbrtf")

math_mpfr_test(
    name = "ceil",
    hdrs = ["CeilTest.h"],
)

math_mpfr_test(
    name = "ceilf",
    hdrs = ["CeilTest.h"],
)

math_mpfr_test(
    name = "ceill",
    hdrs = ["CeilTest.h"],
)

math_mpfr_test(name = "cos")

math_mpfr_test(
    name = "cosf",
    hdrs = ["sdcomp26094.h"],
    deps = [
        "//libc:__support_cpp_array",
    ],
)

math_mpfr_test(
    name = "coshf",
    deps = [
        "//libc:__support_cpp_array",
    ],
)

math_mpfr_test(
    name = "cospif",
    hdrs = ["sdcomp26094.h"],
    deps = [
        "//libc:__support_cpp_array",
    ],
)

math_mpfr_test(
    name = "daddl",
    hdrs = ["AddTest.h"],
)

math_mpfr_test(
    name = "ddivl",
    hdrs = ["DivTest.h"],
)

# TODO: Add dfmal, dmull test.  Missing stdlib/rand dependency.

math_mpfr_test(
    name = "dsqrtl",
    hdrs = ["SqrtTest.h"],
)

math_mpfr_test(
    name = "dsubl",
    hdrs = ["SubTest.h"],
)

math_mpfr_test(name = "erff")

math_mpfr_test(name = "exp")

math_mpfr_test(name = "expf")

math_mpfr_test(name = "exp10")

math_mpfr_test(name = "exp10f")

math_mpfr_test(name = "exp2")

math_mpfr_test(name = "exp2f")

math_mpfr_test(
    name = "exp2m1f",
    deps = [
        "//libc:__support_cpp_array",
    ],
)

math_mpfr_test(name = "expm1")

math_mpfr_test(name = "expm1f")

math_mpfr_test(
    name = "fabs",
    hdrs = ["FAbsTest.h"],
)

math_mpfr_test(
    name = "fabsf",
    hdrs = ["FAbsTest.h"],
)

math_mpfr_test(
    name = "fabsl",
    hdrs = ["FAbsTest.h"],
)

math_mpfr_test(
    name = "fadd",
    hdrs = ["AddTest.h"],
)

math_mpfr_test(
    name = "faddl",
    hdrs = ["AddTest.h"],
)

math_mpfr_test(
    name = "fdiv",
    hdrs = ["DivTest.h"],
)

math_mpfr_test(
    name = "fdivl",
    hdrs = ["DivTest.h"],
)

# TODO: Add ffma, ffmal test.  Missing stdlib/rand dependency.

math_mpfr_test(
    name = "floor",
    hdrs = ["FloorTest.h"],
)

math_mpfr_test(
    name = "floorf",
    hdrs = ["FloorTest.h"],
)

math_mpfr_test(
    name = "floorl",
    hdrs = ["FloorTest.h"],
)

# TODO: Add fma, fmaf, fmal, fmul, fmull tests.  Missing stdlib/rand dependency.

math_mpfr_test(
    name = "frexp",
    hdrs = ["FrexpTest.h"],
)

math_mpfr_test(
    name = "frexpf",
    hdrs = ["FrexpTest.h"],
)

math_mpfr_test(
    name = "frexpl",
    hdrs = ["FrexpTest.h"],
)

math_mpfr_test(
    name = "fsqrt",
    hdrs = ["SqrtTest.h"],
)

math_mpfr_test(
    name = "fsqrtl",
    hdrs = ["SqrtTest.h"],
)

math_mpfr_test(
    name = "fsub",
    hdrs = ["SubTest.h"],
)

math_mpfr_test(
    name = "fsubl",
    hdrs = ["SubTest.h"],
)

math_mpfr_test(
    name = "hypot",
    hdrs = ["HypotTest.h"],
)

math_mpfr_test(
    name = "hypotf",
    hdrs = [
        "HypotTest.h",
        "hypotf_hard_to_round.h",
    ],
)

math_mpfr_test(
    name = "llrint",
    hdrs = ["RoundToIntegerTest.h"],
)

math_mpfr_test(
    name = "llrintf",
    hdrs = ["RoundToIntegerTest.h"],
)

math_mpfr_test(
    name = "llrintl",
    hdrs = ["RoundToIntegerTest.h"],
)

math_mpfr_test(
    name = "llround",
    hdrs = ["RoundToIntegerTest.h"],
)

math_mpfr_test(
    name = "llroundf",
    hdrs = ["RoundToIntegerTest.h"],
)

math_mpfr_test(
    name = "llroundl",
    hdrs = ["RoundToIntegerTest.h"],
)

math_mpfr_test(name = "log")

math_mpfr_test(name = "logf")

math_mpfr_test(name = "log10")

math_mpfr_test(name = "log10f")

math_mpfr_test(name = "log1p")

math_mpfr_test(name = "log1pf")

math_mpfr_test(name = "log2")

math_mpfr_test(name = "log2f")

math_mpfr_test(
    name = "lrint",
    hdrs = ["RoundToIntegerTest.h"],
)

math_mpfr_test(
    name = "lrintf",
    hdrs = ["RoundToIntegerTest.h"],
)

math_mpfr_test(
    name = "lrintl",
    hdrs = ["RoundToIntegerTest.h"],
)

math_mpfr_test(
    name = "lround",
    hdrs = ["RoundToIntegerTest.h"],
)

math_mpfr_test(
    name = "lroundf",
    hdrs = ["RoundToIntegerTest.h"],
)

math_mpfr_test(
    name = "lroundl",
    hdrs = ["RoundToIntegerTest.h"],
)

# TODO: add nan tests.

math_mpfr_test(
    name = "nearbyint",
    hdrs = ["NearbyIntTest.h"],
    deps = [
        "//libc:__support_cpp_array",
    ],
)

math_mpfr_test(
    name = "nearbyintf",
    hdrs = ["NearbyIntTest.h"],
    deps = [
        "//libc:__support_cpp_array",
    ],
)

math_mpfr_test(
    name = "nearbyintl",
    hdrs = ["NearbyIntTest.h"],
    deps = [
        "//libc:__support_cpp_array",
    ],
)

math_mpfr_test(name = "pow")

math_mpfr_test(name = "powf")

math_mpfr_test(
    name = "remquo",
    hdrs = ["RemQuoTest.h"],
)

math_mpfr_test(
    name = "remquof",
    hdrs = ["RemQuoTest.h"],
)

math_mpfr_test(
    name = "remquol",
    hdrs = ["RemQuoTest.h"],
)

math_mpfr_test(
    name = "rint",
    hdrs = ["RIntTest.h"],
)

math_mpfr_test(
    name = "rintf",
    hdrs = ["RIntTest.h"],
)

math_mpfr_test(
    name = "rintl",
    hdrs = ["RIntTest.h"],
)

math_mpfr_test(
    name = "roundeven",
    hdrs = ["RoundEvenTest.h"],
)

math_mpfr_test(
    name = "roundevenf",
    hdrs = ["RoundEvenTest.h"],
)

math_mpfr_test(
    name = "roundevenl",
    hdrs = ["RoundEvenTest.h"],
)

math_mpfr_test(
    name = "round",
    hdrs = ["RoundTest.h"],
)

math_mpfr_test(
    name = "roundf",
    hdrs = ["RoundTest.h"],
)

math_mpfr_test(
    name = "roundl",
    hdrs = ["RoundTest.h"],
)

math_mpfr_test(name = "sin")

math_mpfr_test(
    name = "sinf",
    hdrs = ["sdcomp26094.h"],
    deps = [
        "//libc:__support_cpp_array",
    ],
)

math_mpfr_test(name = "sincos")

math_mpfr_test(
    name = "sincosf",
    hdrs = ["sdcomp26094.h"],
    deps = [
        "//libc:__support_cpp_array",
    ],
)

math_mpfr_test(
    name = "sinhf",
    deps = [
        "//libc:__support_cpp_array",
    ],
)

math_mpfr_test(
    name = "sinpif",
    hdrs = ["sdcomp26094.h"],
    deps = [
        "//libc:__support_cpp_array",
    ],
)

math_mpfr_test(
    name = "sqrt",
    hdrs = ["SqrtTest.h"],
)

math_mpfr_test(
    name = "sqrtf",
    hdrs = ["SqrtTest.h"],
)

math_mpfr_test(
    name = "sqrtl",
    hdrs = ["SqrtTest.h"],
)

math_mpfr_test(name = "tan")

math_mpfr_test(
    name = "tanf",
    hdrs = ["sdcomp26094.h"],
    deps = [
        "//libc:__support_cpp_array",
    ],
)

math_mpfr_test(name = "tanhf")

math_mpfr_test(
    name = "trunc",
    hdrs = ["TruncTest.h"],
)

math_mpfr_test(
    name = "truncf",
    hdrs = ["TruncTest.h"],
)

math_mpfr_test(
    name = "truncl",
    hdrs = ["TruncTest.h"],
)