[llvm] [libc][bazel] Add CPP tests (PR #65941)
Guillaume Chatelet via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 11 02:43:12 PDT 2023
https://github.com/gchatelet created https://github.com/llvm/llvm-project/pull/65941:
This PR adds tests for the `src/__support/CPP` folder to the bazel build system.
>From 56058041a1a2d562853cb7dfb63dd4947a2f13db Mon Sep 17 00:00:00 2001
From: Guillaume Chatelet <gchatelet at google.com>
Date: Mon, 11 Sep 2023 09:37:48 +0000
Subject: [PATCH] [libc][bazel] Add CPP tests
---
.../libc/test/src/__support/CPP/BUILD.bazel | 112 ++++++++++++++++++
1 file changed, 112 insertions(+)
create mode 100644 utils/bazel/llvm-project-overlay/libc/test/src/__support/CPP/BUILD.bazel
diff --git a/utils/bazel/llvm-project-overlay/libc/test/src/__support/CPP/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/test/src/__support/CPP/BUILD.bazel
new file mode 100644
index 000000000000000..c74f9821849a7a0
--- /dev/null
+++ b/utils/bazel/llvm-project-overlay/libc/test/src/__support/CPP/BUILD.bazel
@@ -0,0 +1,112 @@
+# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+
+# Tests for LLVM libc CPP functions.
+
+package(default_visibility = ["//visibility:public"])
+
+licenses(["notice"])
+
+cc_test(
+ name = "atomic_test",
+ srcs = ["atomic_test.cpp"],
+ deps = [
+ "//libc:__support_cpp_atomic",
+ "//libc:libc_root",
+ "//libc/test/UnitTest:LibcUnitTest",
+ ],
+)
+
+cc_test(
+ name = "bitset_test",
+ srcs = ["bitset_test.cpp"],
+ deps = [
+ "//libc:__support_cpp_bitset",
+ "//libc:libc_root",
+ "//libc/test/UnitTest:LibcUnitTest",
+ ],
+)
+
+cc_test(
+ name = "cstddef_test",
+ srcs = ["cstddef_test.cpp"],
+ deps = [
+ "//libc:__support_cpp_cstddef",
+ "//libc:libc_root",
+ "//libc/test/UnitTest:LibcUnitTest",
+ ],
+)
+
+cc_test(
+ name = "integer_sequence_test",
+ srcs = ["integer_sequence_test.cpp"],
+ deps = [
+ "//libc:__support_cpp_utility",
+ "//libc:libc_root",
+ "//libc/test/UnitTest:LibcUnitTest",
+ ],
+)
+
+cc_test(
+ name = "limits_test",
+ srcs = ["limits_test.cpp"],
+ deps = [
+ "//libc:__support_cpp_limits",
+ "//libc:__support_uint",
+ "//libc:libc_root",
+ "//libc/test/UnitTest:LibcUnitTest",
+ ],
+)
+
+cc_test(
+ name = "optional_test",
+ srcs = ["optional_test.cpp"],
+ deps = [
+ "//libc:__support_cpp_optional",
+ "//libc:libc_root",
+ "//libc/test/UnitTest:LibcUnitTest",
+ ],
+)
+
+cc_test(
+ name = "span_test",
+ srcs = ["span_test.cpp"],
+ deps = [
+ "//libc:__support_cpp_array",
+ "//libc:__support_cpp_span",
+ "//libc:libc_root",
+ "//libc/test/UnitTest:LibcUnitTest",
+ ],
+)
+
+cc_test(
+ name = "stringstream_test",
+ srcs = ["stringstream_test.cpp"],
+ deps = [
+ "//libc:__support_cpp_span",
+ "//libc:__support_cpp_stringstream",
+ "//libc:libc_root",
+ "//libc/test/UnitTest:LibcUnitTest",
+ ],
+)
+
+cc_test(
+ name = "string_test",
+ srcs = ["string_test.cpp"],
+ deps = [
+ "//libc:__support_cpp_string",
+ "//libc:libc_root",
+ "//libc/test/UnitTest:LibcUnitTest",
+ ],
+)
+
+cc_test(
+ name = "stringview_test",
+ srcs = ["stringview_test.cpp"],
+ deps = [
+ "//libc:__support_cpp_string_view",
+ "//libc:libc_root",
+ "//libc/test/UnitTest:LibcUnitTest",
+ ],
+)
More information about the llvm-commits
mailing list