4
4
5
5
# Tests for LLVM libc math.h functions.
6
6
7
+ load ("//libc:libc_build_rules.bzl" , "libc_support_library" )
7
8
load ("//libc/test:libc_test_rules.bzl" , "libc_test" )
8
9
9
10
package (default_visibility = ["//visibility:public" ])
10
11
11
12
licenses (["notice" ])
12
13
14
+ libc_support_library (
15
+ name = "excepts" ,
16
+ hdrs = ["excepts.h" ],
17
+ deps = [
18
+ "//libc:hdr_fenv_macros" ,
19
+ ],
20
+ )
21
+
13
22
libc_test (
14
23
name = "exception_status_test" ,
15
24
srcs = ["exception_status_test.cpp" ],
@@ -20,8 +29,10 @@ libc_test(
20
29
"//libc:fetestexcept" ,
21
30
],
22
31
deps = [
32
+ ":excepts" ,
23
33
"//libc:__support_fputil_fenv_impl" ,
24
- "//libc:hdr_fenv_macros" ,
34
+ "//libc:hdr_fenv_macros" ,
35
+ "//libc/test/UnitTest:fp_test_helpers" ,
25
36
],
26
37
)
27
38
@@ -32,7 +43,11 @@ libc_test(
32
43
"//libc:fegetround" ,
33
44
"//libc:fesetround" ,
34
45
],
35
- deps = ["//libc:hdr_fenv_macros" ],
46
+ deps = [
47
+ ":excepts" ,
48
+ "//libc:hdr_fenv_macros" ,
49
+ "//libc/test/UnitTest:fp_test_helpers" ,
50
+ ],
36
51
)
37
52
38
53
libc_test (
@@ -45,11 +60,12 @@ libc_test(
45
60
],
46
61
tags = ["nosan" ],
47
62
deps = [
63
+ ":excepts" ,
48
64
"//libc:__support_common" ,
49
65
"//libc:__support_fputil_fenv_impl" ,
50
66
"//libc:__support_macros_properties_architectures" ,
67
+ "//libc:hdr_fenv_macros" ,
51
68
"//libc/test/UnitTest:fp_test_helpers" ,
52
- "//libc:hdr_fenv_macros" ,
53
69
],
54
70
)
55
71
@@ -61,11 +77,12 @@ libc_test(
61
77
],
62
78
tags = ["nosan" ],
63
79
deps = [
80
+ ":excepts" ,
64
81
"//libc:__support_common" ,
65
82
"//libc:__support_fputil_fenv_impl" ,
66
83
"//libc:__support_macros_properties_architectures" ,
84
+ "//libc:types_fenv_t" ,
67
85
"//libc/test/UnitTest:fp_test_helpers" ,
68
- "//libc:types_fenv_t" ,
69
86
],
70
87
)
71
88
@@ -78,8 +95,10 @@ libc_test(
78
95
"//libc:fetestexceptflag" ,
79
96
],
80
97
deps = [
98
+ ":excepts" ,
81
99
"//libc:__support_fputil_fenv_impl" ,
82
- "//libc:types_fexcept_t" ,
100
+ "//libc:types_fexcept_t" ,
101
+ "//libc/test/UnitTest:fp_test_helpers" ,
83
102
],
84
103
)
85
104
@@ -90,8 +109,10 @@ libc_test(
90
109
"//libc:feclearexcept" ,
91
110
],
92
111
deps = [
112
+ ":excepts" ,
93
113
"//libc:__support_fputil_fenv_impl" ,
94
- "//libc:hdr_fenv_macros" ,
114
+ "//libc:hdr_fenv_macros" ,
115
+ "//libc/test/UnitTest:fp_test_helpers" ,
95
116
],
96
117
)
97
118
@@ -104,9 +125,11 @@ libc_test(
104
125
"//libc:fegetexcept" ,
105
126
],
106
127
deps = [
128
+ ":excepts" ,
107
129
"//libc:__support_common" ,
108
130
"//libc:__support_macros_properties_architectures" ,
109
- "//libc:hdr_fenv_macros" ,
131
+ "//libc:hdr_fenv_macros" ,
132
+ "//libc/test/UnitTest:fp_test_helpers" ,
110
133
],
111
134
)
112
135
@@ -117,8 +140,10 @@ libc_test(
117
140
"//libc:feupdateenv" ,
118
141
],
119
142
deps = [
143
+ ":excepts" ,
120
144
"//libc:__support_fputil_fenv_impl" ,
121
- "//libc:types_fenv_t" ,
145
+ "//libc:types_fenv_t" ,
146
+ "//libc/test/UnitTest:fp_test_helpers" ,
122
147
],
123
148
)
124
149
@@ -132,7 +157,9 @@ libc_test(
132
157
"//libc:fesetround" ,
133
158
],
134
159
deps = [
160
+ ":excepts" ,
135
161
"//libc:__support_fputil_fenv_impl" ,
136
- "//libc:types_fenv_t" ,
162
+ "//libc:types_fenv_t" ,
163
+ "//libc/test/UnitTest:fp_test_helpers" ,
137
164
],
138
165
)
0 commit comments