Skip to content

Commit 6632882

Browse files
authored
[libc][bazel] Add CPP tests (#65941)
This PR adds tests for the `src/__support/CPP` folder to the bazel build system.
1 parent 8834825 commit 6632882

File tree

1 file changed

+112
-0
lines changed
  • utils/bazel/llvm-project-overlay/libc/test/src/__support/CPP

1 file changed

+112
-0
lines changed
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
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 CPP functions.
6+
7+
package(default_visibility = ["//visibility:public"])
8+
9+
licenses(["notice"])
10+
11+
cc_test(
12+
name = "atomic_test",
13+
srcs = ["atomic_test.cpp"],
14+
deps = [
15+
"//libc:__support_cpp_atomic",
16+
"//libc:libc_root",
17+
"//libc/test/UnitTest:LibcUnitTest",
18+
],
19+
)
20+
21+
cc_test(
22+
name = "bitset_test",
23+
srcs = ["bitset_test.cpp"],
24+
deps = [
25+
"//libc:__support_cpp_bitset",
26+
"//libc:libc_root",
27+
"//libc/test/UnitTest:LibcUnitTest",
28+
],
29+
)
30+
31+
cc_test(
32+
name = "cstddef_test",
33+
srcs = ["cstddef_test.cpp"],
34+
deps = [
35+
"//libc:__support_cpp_cstddef",
36+
"//libc:libc_root",
37+
"//libc/test/UnitTest:LibcUnitTest",
38+
],
39+
)
40+
41+
cc_test(
42+
name = "integer_sequence_test",
43+
srcs = ["integer_sequence_test.cpp"],
44+
deps = [
45+
"//libc:__support_cpp_utility",
46+
"//libc:libc_root",
47+
"//libc/test/UnitTest:LibcUnitTest",
48+
],
49+
)
50+
51+
cc_test(
52+
name = "limits_test",
53+
srcs = ["limits_test.cpp"],
54+
deps = [
55+
"//libc:__support_cpp_limits",
56+
"//libc:__support_uint",
57+
"//libc:libc_root",
58+
"//libc/test/UnitTest:LibcUnitTest",
59+
],
60+
)
61+
62+
cc_test(
63+
name = "optional_test",
64+
srcs = ["optional_test.cpp"],
65+
deps = [
66+
"//libc:__support_cpp_optional",
67+
"//libc:libc_root",
68+
"//libc/test/UnitTest:LibcUnitTest",
69+
],
70+
)
71+
72+
cc_test(
73+
name = "span_test",
74+
srcs = ["span_test.cpp"],
75+
deps = [
76+
"//libc:__support_cpp_array",
77+
"//libc:__support_cpp_span",
78+
"//libc:libc_root",
79+
"//libc/test/UnitTest:LibcUnitTest",
80+
],
81+
)
82+
83+
cc_test(
84+
name = "stringstream_test",
85+
srcs = ["stringstream_test.cpp"],
86+
deps = [
87+
"//libc:__support_cpp_span",
88+
"//libc:__support_cpp_stringstream",
89+
"//libc:libc_root",
90+
"//libc/test/UnitTest:LibcUnitTest",
91+
],
92+
)
93+
94+
cc_test(
95+
name = "string_test",
96+
srcs = ["string_test.cpp"],
97+
deps = [
98+
"//libc:__support_cpp_string",
99+
"//libc:libc_root",
100+
"//libc/test/UnitTest:LibcUnitTest",
101+
],
102+
)
103+
104+
cc_test(
105+
name = "stringview_test",
106+
srcs = ["stringview_test.cpp"],
107+
deps = [
108+
"//libc:__support_cpp_string_view",
109+
"//libc:libc_root",
110+
"//libc/test/UnitTest:LibcUnitTest",
111+
],
112+
)

0 commit comments

Comments
 (0)