Debian Codegraph @

utils/bazel/llvm-project-overlay/libc/test/UnitTest/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 # LLVM libc unittest library.
6
7 load("//libc:libc_build_rules.bzl", "libc_support_library")
8
9 package(default_visibility = ["//visibility:public"])
10
11 licenses(["notice"])
12
13 libc_support_library(
14 name = "test_logger",
15 srcs = ["TestLogger.cpp"],
16 hdrs = ["TestLogger.h"],
17 deps = [
18 "//libc:__support_big_int",
19 "//libc:__support_cpp_string",
20 "//libc:__support_cpp_string_view",
21 "//libc:__support_macros_config",
22 "//libc:__support_macros_properties_types",
23 "//libc:__support_osutil_io",
24 "//libc:__support_uint128",
25 ],
26 )
27
28 libc_support_library(
29 name = "LibcUnitTest",
30 srcs = [
31 "BazelFilePath.cpp",
32 "ExecuteFunctionUnix.cpp",
33 "LibcTest.cpp",
34 "LibcTestMain.cpp",
35 ],
36 hdrs = [
37 "ErrnoSetterMatcher.h",
38 "ExecuteFunction.h",
39 "LibcTest.h",
40 "PlatformDefs.h",
41 "Test.h",
42 ],
43 deps = [
44 ":test_logger",
45 "//libc:__support_c_string",
46 "//libc:__support_cpp_bit",
47 "//libc:__support_cpp_bitset",
48 "//libc:__support_cpp_span",
49 "//libc:__support_cpp_string",
50 "//libc:__support_cpp_string_view",
51 "//libc:__support_cpp_type_traits",
52 "//libc:__support_fixed_point",
53 "//libc:__support_fputil_fp_bits",
54 "//libc:__support_fputil_fpbits_str",
55 "//libc:__support_fputil_rounding_mode",
56 "//libc:__support_macros_config",
57 "//libc:__support_macros_properties_architectures",
58 "//libc:__support_macros_properties_types",
59 "//libc:__support_stringutil",
60 "//libc:__support_uint128",
61 "//libc:errno",
62 "//libc:llvm_libc_macros_stdfix_macros",
63 "//llvm:Support",
64 ],
65 )
66
67 libc_support_library(
68 name = "fp_test_helpers",
69 srcs = [
70 "FEnvSafeTest.cpp",
71 "FPExceptMatcher.cpp",
72 "RoundingModeUtils.cpp",
73 ],
74 hdrs = [
75 "FEnvSafeTest.h",
76 "FPExceptMatcher.h",
77 "FPMatcher.h",
78 "RoundingModeUtils.h",
79 ],
80 deps = [
81 ":LibcUnitTest",
82 ":string_utils",
83 ":test_logger",
84 "//libc:__support_cpp_array",
85 "//libc:__support_cpp_bit",
86 "//libc:__support_cpp_bitset",
87 "//libc:__support_cpp_span",
88 "//libc:__support_cpp_type_traits",
89 "//libc:__support_cpp_utility",
90 "//libc:__support_fputil_fenv_impl",
91 "//libc:__support_fputil_fp_bits",
92 "//libc:__support_fputil_fpbits_str",
93 "//libc:__support_fputil_rounding_mode",
94 "//libc:__support_macros_config",
95 "//libc:__support_macros_properties_architectures",
96 "//libc:hdr_fenv_macros",
97 "//libc:hdr_math_macros",
98 "//libc:types_fenv_t",
99 ],
100 )
101
102 libc_support_library(
103 name = "memory_matcher",
104 srcs = [
105 "MemoryMatcher.cpp",
106 ],
107 hdrs = [
108 "MemoryMatcher.h",
109 ],
110 deps = [
111 ":LibcUnitTest",
112 "//libc:__support_cpp_bit",
113 "//libc:__support_cpp_bitset",
114 "//libc:__support_cpp_span",
115 "//libc:__support_cpp_type_traits",
116 "//libc:__support_macros_config",
117 ],
118 )
119
120 libc_support_library(
121 name = "printf_matcher",
122 srcs = [
123 "PrintfMatcher.cpp",
124 ],
125 hdrs = [
126 "PrintfMatcher.h",
127 ],
128 deps = [
129 ":LibcUnitTest",
130 ":string_utils",
131 "//libc:__support_fputil_fp_bits",
132 "//libc:__support_macros_config",
133 "//libc:printf_core_structs",
134 ],
135 )
136
137 libc_support_library(
138 name = "string_utils",
139 hdrs = [
140 "StringUtils.h",
141 ],
142 deps = [
143 "//libc:__support_big_int",
144 "//libc:__support_cpp_string",
145 "//libc:__support_cpp_type_traits",
146 "//libc:__support_macros_config",
147 ],
148 )