44
55# Tests for LLVM libc math.h functions.
66
7+ load ("//libc:libc_build_rules.bzl" , "libc_support_library" )
78load ("//libc/test:libc_test_rules.bzl" , "libc_test" )
89
910package (default_visibility = ["//visibility:public" ])
1011
1112licenses (["notice" ])
1213
14+ libc_support_library (
15+ name = "excepts" ,
16+ hdrs = ["excepts.h" ],
17+ deps = [
18+ "//libc:hdr_fenv_macros" ,
19+ ],
20+ )
21+
1322libc_test (
1423 name = "exception_status_test" ,
1524 srcs = ["exception_status_test.cpp" ],
@@ -20,8 +29,10 @@ libc_test(
2029 "//libc:fetestexcept" ,
2130 ],
2231 deps = [
32+ ":excepts" ,
2333 "//libc:__support_fputil_fenv_impl" ,
24- "//libc:hdr_fenv_macros" ,
34+ "//libc:hdr_fenv_macros" ,
35+ "//libc/test/UnitTest:fp_test_helpers" ,
2536 ],
2637)
2738
@@ -32,7 +43,11 @@ libc_test(
3243 "//libc:fegetround" ,
3344 "//libc:fesetround" ,
3445 ],
35- deps = ["//libc:hdr_fenv_macros" ],
46+ deps = [
47+ ":excepts" ,
48+ "//libc:hdr_fenv_macros" ,
49+ "//libc/test/UnitTest:fp_test_helpers" ,
50+ ],
3651)
3752
3853libc_test (
@@ -45,11 +60,12 @@ libc_test(
4560 ],
4661 tags = ["nosan" ],
4762 deps = [
63+ ":excepts" ,
4864 "//libc:__support_common" ,
4965 "//libc:__support_fputil_fenv_impl" ,
5066 "//libc:__support_macros_properties_architectures" ,
67+ "//libc:hdr_fenv_macros" ,
5168 "//libc/test/UnitTest:fp_test_helpers" ,
52- "//libc:hdr_fenv_macros" ,
5369 ],
5470)
5571
@@ -61,11 +77,12 @@ libc_test(
6177 ],
6278 tags = ["nosan" ],
6379 deps = [
80+ ":excepts" ,
6481 "//libc:__support_common" ,
6582 "//libc:__support_fputil_fenv_impl" ,
6683 "//libc:__support_macros_properties_architectures" ,
84+ "//libc:types_fenv_t" ,
6785 "//libc/test/UnitTest:fp_test_helpers" ,
68- "//libc:types_fenv_t" ,
6986 ],
7087)
7188
@@ -78,8 +95,10 @@ libc_test(
7895 "//libc:fetestexceptflag" ,
7996 ],
8097 deps = [
98+ ":excepts" ,
8199 "//libc:__support_fputil_fenv_impl" ,
82- "//libc:types_fexcept_t" ,
100+ "//libc:types_fexcept_t" ,
101+ "//libc/test/UnitTest:fp_test_helpers" ,
83102 ],
84103)
85104
@@ -90,8 +109,10 @@ libc_test(
90109 "//libc:feclearexcept" ,
91110 ],
92111 deps = [
112+ ":excepts" ,
93113 "//libc:__support_fputil_fenv_impl" ,
94- "//libc:hdr_fenv_macros" ,
114+ "//libc:hdr_fenv_macros" ,
115+ "//libc/test/UnitTest:fp_test_helpers" ,
95116 ],
96117)
97118
@@ -104,9 +125,11 @@ libc_test(
104125 "//libc:fegetexcept" ,
105126 ],
106127 deps = [
128+ ":excepts" ,
107129 "//libc:__support_common" ,
108130 "//libc:__support_macros_properties_architectures" ,
109- "//libc:hdr_fenv_macros" ,
131+ "//libc:hdr_fenv_macros" ,
132+ "//libc/test/UnitTest:fp_test_helpers" ,
110133 ],
111134)
112135
@@ -117,8 +140,10 @@ libc_test(
117140 "//libc:feupdateenv" ,
118141 ],
119142 deps = [
143+ ":excepts" ,
120144 "//libc:__support_fputil_fenv_impl" ,
121- "//libc:types_fenv_t" ,
145+ "//libc:types_fenv_t" ,
146+ "//libc/test/UnitTest:fp_test_helpers" ,
122147 ],
123148)
124149
@@ -132,7 +157,9 @@ libc_test(
132157 "//libc:fesetround" ,
133158 ],
134159 deps = [
160+ ":excepts" ,
135161 "//libc:__support_fputil_fenv_impl" ,
136- "//libc:types_fenv_t" ,
162+ "//libc:types_fenv_t" ,
163+ "//libc/test/UnitTest:fp_test_helpers" ,
137164 ],
138165)
0 commit comments