xref: /llvm-project/utils/bazel/llvm-project-overlay/libc/test/src/math/BUILD.bazel (revision 33f1235b80255c585b1d16fe3c5769ee695f7ed5)
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 math.h functions.
6
7load("//libc/test/src/math:libc_math_test_rules.bzl", "math_mpfr_test")
8
9package(default_visibility = ["//visibility:public"])
10
11exports_files(["libc_math_test_rules.bzl"])
12
13licenses(["notice"])
14
15math_mpfr_test(name = "acosf")
16
17math_mpfr_test(name = "acoshf")
18
19math_mpfr_test(name = "asinf")
20
21math_mpfr_test(name = "asinhf")
22
23math_mpfr_test(name = "atan2")
24
25math_mpfr_test(name = "atan2f")
26
27math_mpfr_test(name = "atanf")
28
29math_mpfr_test(name = "atanhf")
30
31math_mpfr_test(name = "cbrt")
32
33math_mpfr_test(name = "cbrtf")
34
35math_mpfr_test(
36    name = "ceil",
37    hdrs = ["CeilTest.h"],
38)
39
40math_mpfr_test(
41    name = "ceilf",
42    hdrs = ["CeilTest.h"],
43)
44
45math_mpfr_test(
46    name = "ceill",
47    hdrs = ["CeilTest.h"],
48)
49
50math_mpfr_test(name = "cos")
51
52math_mpfr_test(
53    name = "cosf",
54    hdrs = ["sdcomp26094.h"],
55    deps = [
56        "//libc:__support_cpp_array",
57    ],
58)
59
60math_mpfr_test(
61    name = "coshf",
62    deps = [
63        "//libc:__support_cpp_array",
64    ],
65)
66
67math_mpfr_test(
68    name = "cospif",
69    hdrs = ["sdcomp26094.h"],
70    deps = [
71        "//libc:__support_cpp_array",
72    ],
73)
74
75math_mpfr_test(
76    name = "daddl",
77    hdrs = ["AddTest.h"],
78)
79
80math_mpfr_test(
81    name = "ddivl",
82    hdrs = ["DivTest.h"],
83)
84
85# TODO: Add dfmal, dmull test.  Missing stdlib/rand dependency.
86
87math_mpfr_test(
88    name = "dsqrtl",
89    hdrs = ["SqrtTest.h"],
90)
91
92math_mpfr_test(
93    name = "dsubl",
94    hdrs = ["SubTest.h"],
95)
96
97math_mpfr_test(name = "erff")
98
99math_mpfr_test(name = "exp")
100
101math_mpfr_test(name = "expf")
102
103math_mpfr_test(name = "exp10")
104
105math_mpfr_test(name = "exp10f")
106
107math_mpfr_test(name = "exp2")
108
109math_mpfr_test(name = "exp2f")
110
111math_mpfr_test(
112    name = "exp2m1f",
113    deps = [
114        "//libc:__support_cpp_array",
115    ],
116)
117
118math_mpfr_test(name = "expm1")
119
120math_mpfr_test(name = "expm1f")
121
122math_mpfr_test(
123    name = "fabs",
124    hdrs = ["FAbsTest.h"],
125)
126
127math_mpfr_test(
128    name = "fabsf",
129    hdrs = ["FAbsTest.h"],
130)
131
132math_mpfr_test(
133    name = "fabsl",
134    hdrs = ["FAbsTest.h"],
135)
136
137math_mpfr_test(
138    name = "fadd",
139    hdrs = ["AddTest.h"],
140)
141
142math_mpfr_test(
143    name = "faddl",
144    hdrs = ["AddTest.h"],
145)
146
147math_mpfr_test(
148    name = "fdiv",
149    hdrs = ["DivTest.h"],
150)
151
152math_mpfr_test(
153    name = "fdivl",
154    hdrs = ["DivTest.h"],
155)
156
157# TODO: Add ffma, ffmal test.  Missing stdlib/rand dependency.
158
159math_mpfr_test(
160    name = "floor",
161    hdrs = ["FloorTest.h"],
162)
163
164math_mpfr_test(
165    name = "floorf",
166    hdrs = ["FloorTest.h"],
167)
168
169math_mpfr_test(
170    name = "floorl",
171    hdrs = ["FloorTest.h"],
172)
173
174# TODO: Add fma, fmaf, fmal, fmul, fmull tests.  Missing stdlib/rand dependency.
175
176math_mpfr_test(
177    name = "frexp",
178    hdrs = ["FrexpTest.h"],
179)
180
181math_mpfr_test(
182    name = "frexpf",
183    hdrs = ["FrexpTest.h"],
184)
185
186math_mpfr_test(
187    name = "frexpl",
188    hdrs = ["FrexpTest.h"],
189)
190
191math_mpfr_test(
192    name = "fsqrt",
193    hdrs = ["SqrtTest.h"],
194)
195
196math_mpfr_test(
197    name = "fsqrtl",
198    hdrs = ["SqrtTest.h"],
199)
200
201math_mpfr_test(
202    name = "fsub",
203    hdrs = ["SubTest.h"],
204)
205
206math_mpfr_test(
207    name = "fsubl",
208    hdrs = ["SubTest.h"],
209)
210
211math_mpfr_test(
212    name = "hypot",
213    hdrs = ["HypotTest.h"],
214)
215
216math_mpfr_test(
217    name = "hypotf",
218    hdrs = [
219        "HypotTest.h",
220        "hypotf_hard_to_round.h",
221    ],
222)
223
224math_mpfr_test(
225    name = "llrint",
226    hdrs = ["RoundToIntegerTest.h"],
227)
228
229math_mpfr_test(
230    name = "llrintf",
231    hdrs = ["RoundToIntegerTest.h"],
232)
233
234math_mpfr_test(
235    name = "llrintl",
236    hdrs = ["RoundToIntegerTest.h"],
237)
238
239math_mpfr_test(
240    name = "llround",
241    hdrs = ["RoundToIntegerTest.h"],
242)
243
244math_mpfr_test(
245    name = "llroundf",
246    hdrs = ["RoundToIntegerTest.h"],
247)
248
249math_mpfr_test(
250    name = "llroundl",
251    hdrs = ["RoundToIntegerTest.h"],
252)
253
254math_mpfr_test(name = "log")
255
256math_mpfr_test(name = "logf")
257
258math_mpfr_test(name = "log10")
259
260math_mpfr_test(name = "log10f")
261
262math_mpfr_test(name = "log1p")
263
264math_mpfr_test(name = "log1pf")
265
266math_mpfr_test(name = "log2")
267
268math_mpfr_test(name = "log2f")
269
270math_mpfr_test(
271    name = "lrint",
272    hdrs = ["RoundToIntegerTest.h"],
273)
274
275math_mpfr_test(
276    name = "lrintf",
277    hdrs = ["RoundToIntegerTest.h"],
278)
279
280math_mpfr_test(
281    name = "lrintl",
282    hdrs = ["RoundToIntegerTest.h"],
283)
284
285math_mpfr_test(
286    name = "lround",
287    hdrs = ["RoundToIntegerTest.h"],
288)
289
290math_mpfr_test(
291    name = "lroundf",
292    hdrs = ["RoundToIntegerTest.h"],
293)
294
295math_mpfr_test(
296    name = "lroundl",
297    hdrs = ["RoundToIntegerTest.h"],
298)
299
300# TODO: add nan tests.
301
302math_mpfr_test(
303    name = "nearbyint",
304    hdrs = ["NearbyIntTest.h"],
305    deps = [
306        "//libc:__support_cpp_array",
307    ],
308)
309
310math_mpfr_test(
311    name = "nearbyintf",
312    hdrs = ["NearbyIntTest.h"],
313    deps = [
314        "//libc:__support_cpp_array",
315    ],
316)
317
318math_mpfr_test(
319    name = "nearbyintl",
320    hdrs = ["NearbyIntTest.h"],
321    deps = [
322        "//libc:__support_cpp_array",
323    ],
324)
325
326math_mpfr_test(name = "pow")
327
328math_mpfr_test(name = "powf")
329
330math_mpfr_test(
331    name = "remquo",
332    hdrs = ["RemQuoTest.h"],
333)
334
335math_mpfr_test(
336    name = "remquof",
337    hdrs = ["RemQuoTest.h"],
338)
339
340math_mpfr_test(
341    name = "remquol",
342    hdrs = ["RemQuoTest.h"],
343)
344
345math_mpfr_test(
346    name = "rint",
347    hdrs = ["RIntTest.h"],
348)
349
350math_mpfr_test(
351    name = "rintf",
352    hdrs = ["RIntTest.h"],
353)
354
355math_mpfr_test(
356    name = "rintl",
357    hdrs = ["RIntTest.h"],
358)
359
360math_mpfr_test(
361    name = "roundeven",
362    hdrs = ["RoundEvenTest.h"],
363)
364
365math_mpfr_test(
366    name = "roundevenf",
367    hdrs = ["RoundEvenTest.h"],
368)
369
370math_mpfr_test(
371    name = "roundevenl",
372    hdrs = ["RoundEvenTest.h"],
373)
374
375math_mpfr_test(
376    name = "round",
377    hdrs = ["RoundTest.h"],
378)
379
380math_mpfr_test(
381    name = "roundf",
382    hdrs = ["RoundTest.h"],
383)
384
385math_mpfr_test(
386    name = "roundl",
387    hdrs = ["RoundTest.h"],
388)
389
390math_mpfr_test(name = "sin")
391
392math_mpfr_test(
393    name = "sinf",
394    hdrs = ["sdcomp26094.h"],
395    deps = [
396        "//libc:__support_cpp_array",
397    ],
398)
399
400math_mpfr_test(name = "sincos")
401
402math_mpfr_test(
403    name = "sincosf",
404    hdrs = ["sdcomp26094.h"],
405    deps = [
406        "//libc:__support_cpp_array",
407    ],
408)
409
410math_mpfr_test(
411    name = "sinhf",
412    deps = [
413        "//libc:__support_cpp_array",
414    ],
415)
416
417math_mpfr_test(
418    name = "sinpif",
419    hdrs = ["sdcomp26094.h"],
420    deps = [
421        "//libc:__support_cpp_array",
422    ],
423)
424
425math_mpfr_test(
426    name = "sqrt",
427    hdrs = ["SqrtTest.h"],
428)
429
430math_mpfr_test(
431    name = "sqrtf",
432    hdrs = ["SqrtTest.h"],
433)
434
435math_mpfr_test(
436    name = "sqrtl",
437    hdrs = ["SqrtTest.h"],
438)
439
440math_mpfr_test(name = "tan")
441
442math_mpfr_test(
443    name = "tanf",
444    hdrs = ["sdcomp26094.h"],
445    deps = [
446        "//libc:__support_cpp_array",
447    ],
448)
449
450math_mpfr_test(name = "tanhf")
451
452math_mpfr_test(
453    name = "trunc",
454    hdrs = ["TruncTest.h"],
455)
456
457math_mpfr_test(
458    name = "truncf",
459    hdrs = ["TruncTest.h"],
460)
461
462math_mpfr_test(
463    name = "truncl",
464    hdrs = ["TruncTest.h"],
465)
466