Debian Codegraph @

llvm-project/utils/bazel/llvm-project-overlay/libc/test/src/fenv/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:libc_test_rules.bzl", "libc_test")
8
9 package(default_visibility = ["//visibility:public"])
10
11 licenses(["notice"])
12
13 libc_test(
14 name = "exception_status_test",
15 srcs = ["exception_status_test.cpp"],
16 libc_function_deps = [
17 "//libc:feclearexcept",
18 "//libc:feraiseexcept",
19 "//libc:fetestexcept",
20 ],
21 deps = [
22 "//libc:__support_fputil_fenv_impl",
23 ],
24 )
25
26 libc_test(
27 name = "rounding_mode_test",
28 srcs = ["rounding_mode_test.cpp"],
29 libc_function_deps = [
30 "//libc:fegetround",
31 "//libc:fesetround",
32 ],
33 )
34
35 libc_test(
36 name = "enabled_exceptions_test",
37 srcs = ["enabled_exceptions_test.cpp"],
38 libc_function_deps = [
39 "//libc:feclearexcept",
40 "//libc:feraiseexcept",
41 "//libc:fetestexcept",
42 ],
43 tags = ["nosan"],
44 deps = [
45 "//libc:__support_common",
46 "//libc:__support_fputil_fenv_impl",
47 "//libc/utils/UnitTest:fp_test_helpers",
48 ],
49 )
50
51 libc_test(
52 name = "feholdexcept_test",
53 srcs = ["feholdexcept_test.cpp"],
54 libc_function_deps = [
55 "//libc:feholdexcept",
56 ],
57 tags = ["nosan"],
58 deps = [
59 "//libc:__support_common",
60 "//libc:__support_fputil_fenv_impl",
61 "//libc/utils/UnitTest:fp_test_helpers",
62 ],
63 )
64
65 libc_test(
66 name = "exception_flags_test",
67 srcs = ["exception_flags_test.cpp"],
68 libc_function_deps = [
69 "//libc:fegetexceptflag",
70 "//libc:fesetexceptflag",
71 ],
72 deps = [
73 "//libc:__support_fputil_fenv_impl",
74 ],
75 )
76
77 libc_test(
78 name = "feclearexcept_test",
79 srcs = ["feclearexcept_test.cpp"],
80 libc_function_deps = [
81 "//libc:feclearexcept",
82 ],
83 deps = [
84 "//libc:__support_fputil_fenv_impl",
85 ],
86 )
87
88 libc_test(
89 name = "feenableexcept_test",
90 srcs = ["feenableexcept_test.cpp"],
91 libc_function_deps = [
92 "//libc:fedisableexcept",
93 "//libc:feenableexcept",
94 "//libc:fegetexcept",
95 ],
96 deps = [
97 "//libc:__support_common",
98 ],
99 )
100
101 libc_test(
102 name = "feupdateenv_test",
103 srcs = ["feupdateenv_test.cpp"],
104 libc_function_deps = [
105 "//libc:feupdateenv",
106 ],
107 deps = [
108 "//libc:__support_fputil_fenv_impl",
109 ],
110 )
111
112 libc_test(
113 name = "getenv_and_setenv_test",
114 srcs = ["getenv_and_setenv_test.cpp"],
115 libc_function_deps = [
116 "//libc:fegetenv",
117 "//libc:fegetround",
118 "//libc:fesetenv",
119 "//libc:fesetround",
120 ],
121 deps = [
122 "//libc:__support_fputil_fenv_impl",
123 ],
124 )