Debian Codegraph @

utils/bazel/llvm-project-overlay/libc/test/src/math/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 math.h functions.
6
7 load("//libc/test/src/math:libc_math_test_rules.bzl", "math_mpfr_test")
8
9 package(default_visibility = ["//visibility:public"])
10
11 exports_files(["libc_math_test_rules.bzl"])
12
13 licenses(["notice"])
14
15 math_mpfr_test(name = "acosf")
16
17 math_mpfr_test(name = "acoshf")
18
19 math_mpfr_test(name = "asinf")
20
21 math_mpfr_test(name = "asinhf")
22
23 math_mpfr_test(name = "atan2")
24
25 math_mpfr_test(name = "atan2f")
26
27 math_mpfr_test(name = "atan")
28
29 math_mpfr_test(name = "atanf")
30
31 math_mpfr_test(name = "atanhf")
32
33 math_mpfr_test(name = "cbrt")
34
35 math_mpfr_test(name = "cbrtf")
36
37 math_mpfr_test(
38 name = "ceil",
39 hdrs = ["CeilTest.h"],
40 )
41
42 math_mpfr_test(
43 name = "ceilf",
44 hdrs = ["CeilTest.h"],
45 )
46
47 math_mpfr_test(
48 name = "ceill",
49 hdrs = ["CeilTest.h"],
50 )
51
52 math_mpfr_test(
53 name = "ceilf16",
54 hdrs = ["CeilTest.h"],
55 )
56
57 math_mpfr_test(name = "cos")
58
59 math_mpfr_test(
60 name = "cosf",
61 hdrs = ["sdcomp26094.h"],
62 deps = [
63 "//libc:__support_cpp_array",
64 ],
65 )
66
67 math_mpfr_test(
68 name = "coshf",
69 deps = [
70 "//libc:__support_cpp_array",
71 ],
72 )
73
74 math_mpfr_test(
75 name = "cospif",
76 hdrs = ["sdcomp26094.h"],
77 deps = [
78 "//libc:__support_cpp_array",
79 ],
80 )
81
82 math_mpfr_test(
83 name = "daddl",
84 hdrs = ["AddTest.h"],
85 )
86
87 math_mpfr_test(
88 name = "ddivl",
89 hdrs = ["DivTest.h"],
90 )
91
92 # TODO: Add dfmal, dmull test. Missing stdlib/rand dependency.
93
94 math_mpfr_test(
95 name = "dsqrtl",
96 hdrs = ["SqrtTest.h"],
97 )
98
99 math_mpfr_test(
100 name = "dsubl",
101 hdrs = ["SubTest.h"],
102 )
103
104 math_mpfr_test(name = "erff")
105
106 math_mpfr_test(name = "exp")
107
108 math_mpfr_test(name = "expf")
109
110 math_mpfr_test(name = "exp10")
111
112 math_mpfr_test(name = "exp10f")
113
114 math_mpfr_test(name = "exp2")
115
116 math_mpfr_test(name = "exp2f")
117
118 math_mpfr_test(
119 name = "exp2m1f",
120 deps = [
121 "//libc:__support_cpp_array",
122 ],
123 )
124
125 math_mpfr_test(name = "expm1")
126
127 math_mpfr_test(name = "expm1f")
128
129 math_mpfr_test(
130 name = "fabs",
131 hdrs = ["FAbsTest.h"],
132 )
133
134 math_mpfr_test(
135 name = "fabsf",
136 hdrs = ["FAbsTest.h"],
137 )
138
139 math_mpfr_test(
140 name = "fabsl",
141 hdrs = ["FAbsTest.h"],
142 )
143
144 math_mpfr_test(
145 name = "fadd",
146 hdrs = ["AddTest.h"],
147 )
148
149 math_mpfr_test(
150 name = "faddl",
151 hdrs = ["AddTest.h"],
152 )
153
154 math_mpfr_test(
155 name = "f16add",
156 hdrs = ["AddTest.h"],
157 )
158
159 math_mpfr_test(
160 name = "f16addf",
161 hdrs = ["AddTest.h"],
162 )
163
164 math_mpfr_test(
165 name = "f16addl",
166 hdrs = ["AddTest.h"],
167 )
168
169 math_mpfr_test(
170 name = "fdiv",
171 hdrs = ["DivTest.h"],
172 )
173
174 math_mpfr_test(
175 name = "fdivl",
176 hdrs = ["DivTest.h"],
177 )
178
179 math_mpfr_test(
180 name = "f16div",
181 hdrs = ["DivTest.h"],
182 )
183
184 math_mpfr_test(
185 name = "f16divf",
186 hdrs = ["DivTest.h"],
187 )
188
189 math_mpfr_test(
190 name = "f16divl",
191 hdrs = ["DivTest.h"],
192 )
193
194 # TODO: Add ffma, ffmal test. Missing stdlib/rand dependency.
195
196 math_mpfr_test(
197 name = "floor",
198 hdrs = ["FloorTest.h"],
199 )
200
201 math_mpfr_test(
202 name = "floorf",
203 hdrs = ["FloorTest.h"],
204 )
205
206 math_mpfr_test(
207 name = "floorl",
208 hdrs = ["FloorTest.h"],
209 )
210
211 math_mpfr_test(
212 name = "floorf16",
213 hdrs = ["FloorTest.h"],
214 )
215
216 # TODO: Add fma, fmaf, fmal, fmul, fmull tests. Missing stdlib/rand dependency.
217
218 # math_mpfr_test(name = "f16mul")
219 # math_mpfr_test(name = "f16mulf")
220 # math_mpfr_test(name = "f16mull")
221
222 # math_mpfr_test(name = "f16fma")
223 # math_mpfr_test(name = "f16fmaf")
224 # math_mpfr_test(name = "f16fmal")
225
226 math_mpfr_test(
227 name = "frexp",
228 hdrs = ["FrexpTest.h"],
229 )
230
231 math_mpfr_test(
232 name = "frexpf",
233 hdrs = ["FrexpTest.h"],
234 )
235
236 math_mpfr_test(
237 name = "frexpl",
238 hdrs = ["FrexpTest.h"],
239 )
240
241 math_mpfr_test(
242 name = "fsqrt",
243 hdrs = ["SqrtTest.h"],
244 )
245
246 math_mpfr_test(
247 name = "fsqrtl",
248 hdrs = ["SqrtTest.h"],
249 )
250
251 math_mpfr_test(
252 name = "fsub",
253 hdrs = ["SubTest.h"],
254 )
255
256 math_mpfr_test(
257 name = "fsubl",
258 hdrs = ["SubTest.h"],
259 )
260
261 math_mpfr_test(
262 name = "f16sub",
263 hdrs = ["SubTest.h"],
264 )
265
266 math_mpfr_test(
267 name = "f16subf",
268 hdrs = ["SubTest.h"],
269 )
270
271 math_mpfr_test(
272 name = "f16subl",
273 hdrs = ["SubTest.h"],
274 )
275
276 math_mpfr_test(
277 name = "hypot",
278 hdrs = ["HypotTest.h"],
279 )
280
281 math_mpfr_test(
282 name = "hypotf",
283 hdrs = [
284 "HypotTest.h",
285 "hypotf_hard_to_round.h",
286 ],
287 )
288
289 math_mpfr_test(
290 name = "hypotf16",
291 hdrs = [
292 "HypotTest.h",
293 ],
294 )
295
296 math_mpfr_test(
297 name = "llrint",
298 hdrs = ["RoundToIntegerTest.h"],
299 )
300
301 math_mpfr_test(
302 name = "llrintf",
303 hdrs = ["RoundToIntegerTest.h"],
304 )
305
306 math_mpfr_test(
307 name = "llrintl",
308 hdrs = ["RoundToIntegerTest.h"],
309 )
310
311 math_mpfr_test(
312 name = "llrintf16",
313 hdrs = ["RoundToIntegerTest.h"],
314 )
315
316 math_mpfr_test(
317 name = "llround",
318 hdrs = ["RoundToIntegerTest.h"],
319 )
320
321 math_mpfr_test(
322 name = "llroundf",
323 hdrs = ["RoundToIntegerTest.h"],
324 )
325
326 math_mpfr_test(
327 name = "llroundl",
328 hdrs = ["RoundToIntegerTest.h"],
329 )
330
331 math_mpfr_test(
332 name = "lroundf16",
333 hdrs = ["RoundToIntegerTest.h"],
334 )
335
336 math_mpfr_test(
337 name = "llroundf16",
338 hdrs = ["RoundToIntegerTest.h"],
339 )
340
341 math_mpfr_test(name = "log")
342
343 math_mpfr_test(name = "logf")
344
345 math_mpfr_test(name = "log10")
346
347 math_mpfr_test(name = "log10f")
348
349 math_mpfr_test(name = "log1p")
350
351 math_mpfr_test(name = "log1pf")
352
353 math_mpfr_test(name = "log2")
354
355 math_mpfr_test(name = "log2f")
356
357 math_mpfr_test(
358 name = "lrint",
359 hdrs = ["RoundToIntegerTest.h"],
360 )
361
362 math_mpfr_test(
363 name = "lrintf",
364 hdrs = ["RoundToIntegerTest.h"],
365 )
366
367 math_mpfr_test(
368 name = "lrintl",
369 hdrs = ["RoundToIntegerTest.h"],
370 )
371
372 math_mpfr_test(
373 name = "lrintf16",
374 hdrs = ["RoundToIntegerTest.h"],
375 )
376
377 math_mpfr_test(
378 name = "lround",
379 hdrs = ["RoundToIntegerTest.h"],
380 )
381
382 math_mpfr_test(
383 name = "lroundf",
384 hdrs = ["RoundToIntegerTest.h"],
385 )
386
387 math_mpfr_test(
388 name = "lroundl",
389 hdrs = ["RoundToIntegerTest.h"],
390 )
391
392 # TODO: add nan tests.
393
394 math_mpfr_test(
395 name = "nearbyint",
396 hdrs = ["NearbyIntTest.h"],
397 deps = [
398 "//libc:__support_cpp_array",
399 ],
400 )
401
402 math_mpfr_test(
403 name = "nearbyintf",
404 hdrs = ["NearbyIntTest.h"],
405 deps = [
406 "//libc:__support_cpp_array",
407 ],
408 )
409
410 math_mpfr_test(
411 name = "nearbyintl",
412 hdrs = ["NearbyIntTest.h"],
413 deps = [
414 "//libc:__support_cpp_array",
415 ],
416 )
417
418 math_mpfr_test(
419 name = "nearbyintf16",
420 hdrs = ["NearbyIntTest.h"],
421 deps = [
422 "//libc:__support_cpp_array",
423 ],
424 )
425
426 math_mpfr_test(name = "pow")
427
428 math_mpfr_test(name = "powf")
429
430 math_mpfr_test(
431 name = "remquo",
432 hdrs = ["RemQuoTest.h"],
433 )
434
435 math_mpfr_test(
436 name = "remquof",
437 hdrs = ["RemQuoTest.h"],
438 )
439
440 math_mpfr_test(
441 name = "remquol",
442 hdrs = ["RemQuoTest.h"],
443 )
444
445 math_mpfr_test(
446 name = "rint",
447 hdrs = ["RIntTest.h"],
448 )
449
450 math_mpfr_test(
451 name = "rintf",
452 hdrs = ["RIntTest.h"],
453 )
454
455 math_mpfr_test(
456 name = "rintl",
457 hdrs = ["RIntTest.h"],
458 )
459
460 math_mpfr_test(
461 name = "rintf16",
462 hdrs = ["RIntTest.h"],
463 )
464
465 math_mpfr_test(
466 name = "roundeven",
467 hdrs = ["RoundEvenTest.h"],
468 )
469
470 math_mpfr_test(
471 name = "roundevenf",
472 hdrs = ["RoundEvenTest.h"],
473 )
474
475 math_mpfr_test(
476 name = "roundevenl",
477 hdrs = ["RoundEvenTest.h"],
478 )
479
480 math_mpfr_test(
481 name = "roundevenf16",
482 hdrs = ["RoundEvenTest.h"],
483 )
484
485 math_mpfr_test(
486 name = "round",
487 hdrs = ["RoundTest.h"],
488 )
489
490 math_mpfr_test(
491 name = "roundf",
492 hdrs = ["RoundTest.h"],
493 )
494
495 math_mpfr_test(
496 name = "roundl",
497 hdrs = ["RoundTest.h"],
498 )
499
500 math_mpfr_test(
501 name = "roundf16",
502 hdrs = ["RoundTest.h"],
503 )
504
505 math_mpfr_test(name = "sin")
506
507 math_mpfr_test(
508 name = "sinf",
509 hdrs = ["sdcomp26094.h"],
510 deps = [
511 "//libc:__support_cpp_array",
512 ],
513 )
514
515 math_mpfr_test(name = "sincos")
516
517 math_mpfr_test(
518 name = "sincosf",
519 hdrs = ["sdcomp26094.h"],
520 deps = [
521 "//libc:__support_cpp_array",
522 ],
523 )
524
525 math_mpfr_test(
526 name = "sinhf",
527 deps = [
528 "//libc:__support_cpp_array",
529 ],
530 )
531
532 math_mpfr_test(
533 name = "sinpif",
534 hdrs = ["sdcomp26094.h"],
535 deps = [
536 "//libc:__support_cpp_array",
537 ],
538 )
539
540 math_mpfr_test(
541 name = "tanpif",
542 hdrs = ["sdcomp26094.h"],
543 deps = [
544 "//libc:__support_cpp_array",
545 ],
546 )
547
548 math_mpfr_test(
549 name = "sqrt",
550 hdrs = ["SqrtTest.h"],
551 )
552
553 math_mpfr_test(
554 name = "sqrtf",
555 hdrs = ["SqrtTest.h"],
556 )
557
558 math_mpfr_test(
559 name = "sqrtl",
560 hdrs = ["SqrtTest.h"],
561 )
562
563 math_mpfr_test(
564 name = "f16sqrt",
565 hdrs = ["SqrtTest.h"],
566 )
567
568 math_mpfr_test(
569 name = "f16sqrtf",
570 hdrs = ["SqrtTest.h"],
571 )
572
573 math_mpfr_test(
574 name = "f16sqrtl",
575 hdrs = ["SqrtTest.h"],
576 )
577
578 math_mpfr_test(name = "tan")
579
580 math_mpfr_test(
581 name = "tanf",
582 hdrs = ["sdcomp26094.h"],
583 deps = [
584 "//libc:__support_cpp_array",
585 ],
586 )
587
588 math_mpfr_test(name = "tanhf")
589
590 math_mpfr_test(
591 name = "trunc",
592 hdrs = ["TruncTest.h"],
593 )
594
595 math_mpfr_test(
596 name = "truncf",
597 hdrs = ["TruncTest.h"],
598 )
599
600 math_mpfr_test(
601 name = "truncl",
602 hdrs = ["TruncTest.h"],
603 )
604
605 math_mpfr_test(
606 name = "truncf16",
607 hdrs = ["TruncTest.h"],
608 )
609
610 math_mpfr_test(name = "cosf16")
611
612 math_mpfr_test(name = "cospif16")
613
614 math_mpfr_test(name = "sinf16")
615
616 math_mpfr_test(name = "sinpif16")
617
618 math_mpfr_test(name = "tanf16")
619
620 math_mpfr_test(name = "tanpif16")
621
622 math_mpfr_test(name = "expf16")
623
624 math_mpfr_test(name = "exp2f16")
625
626 math_mpfr_test(name = "exp2m1f16")
627
628 math_mpfr_test(name = "exp10f16")
629
630 math_mpfr_test(name = "exp10m1f16")
631
632 math_mpfr_test(name = "asinf16")
633
634 math_mpfr_test(name = "acosf16")
635
636 math_mpfr_test(name = "coshf16")
637
638 math_mpfr_test(name = "sinhf16")
639
640 math_mpfr_test(name = "tanhf16")
641
642 math_mpfr_test(name = "logf16")
643
644 math_mpfr_test(name = "log2f16")
645
646 math_mpfr_test(name = "log10f16")