-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[libc][bazel] Add CPP tests #65941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
[libc][bazel] Add CPP tests #65941
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
112 changes: 112 additions & 0 deletions
112
utils/bazel/llvm-project-overlay/libc/test/src/__support/CPP/BUILD.bazel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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", | ||
], | ||
) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] why ? these are tests...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've cargo culted it from the other tests
utils/bazel/llvm-project-overlay/libc/test/src/**/BUILD.bazel
.I think this is because of our internal massaging script that tags everything as public on the "internal -> upstream" path. It's probably fixable but I don't want to bother for now :)