Debian Codegraph @

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

raw
1 # This file is licensed under the Apache License v2.0 with LLVM Exceptions.
2 # See https://llvm.org/LICENSE.txt for license information.
3 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
5 # Tests for LLVM libc complex.h functions.
6
7 load("//libc/test:libc_test_rules.bzl", "libc_test")
8
9 package(default_visibility = ["//visibility:public"])
10
11 licenses(["notice"])
12
13 [
14 libc_test(
15 name = func_name + "_test",
16 srcs = [
17 "CImagTest.h",
18 func_name + "_test.cpp",
19 ],
20 deps = ["//libc:func_name".replace("func_name", func_name)] + [
21 "//libc:hdr_math_macros",
22 "//libc/test/UnitTest:fp_test_helpers",
23 ],
24 )
25 for func_name in [
26 "cimag",
27 "cimagf",
28 "cimagl",
29 "cimagf128",
30 "cimagf16",
31 ]
32 ]
33
34 [
35 libc_test(
36 name = func_name + "_test",
37 srcs = [
38 "ConjTest.h",
39 func_name + "_test.cpp",
40 ],
41 deps = ["//libc:func_name".replace("func_name", func_name)] + [
42 "//libc:hdr_math_macros",
43 "//libc/test/UnitTest:fp_test_helpers",
44 ],
45 )
46 for func_name in [
47 "conj",
48 "conjf",
49 "conjl",
50 "conjf128",
51 "conjf16",
52 ]
53 ]
54
55 [
56 libc_test(
57 name = func_name + "_test",
58 srcs = [
59 "CprojTest.h",
60 func_name + "_test.cpp",
61 ],
62 deps = ["//libc:func_name".replace("func_name", func_name)] + [
63 "//libc:hdr_math_macros",
64 "//libc/test/UnitTest:fp_test_helpers",
65 ] + (["//libc/utils/MPCWrapper:mpc_wrapper"] if func_name == "cprojf" else []),
66 )
67 for func_name in [
68 "cproj",
69 "cprojf",
70 "cprojl",
71 "cprojf128",
72 "cprojf16",
73 ]
74 ]
75
76 [
77 libc_test(
78 name = func_name + "_test",
79 srcs = [
80 "CRealTest.h",
81 func_name + "_test.cpp",
82 ],
83 deps = ["//libc:func_name".replace("func_name", func_name)] + [
84 "//libc:hdr_math_macros",
85 "//libc/test/UnitTest:fp_test_helpers",
86 ],
87 )
88 for func_name in [
89 "creal",
90 "crealf",
91 "creall",
92 "crealf128",
93 "crealf16",
94 ]
95 ]