-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[libc++] Move more tests into better places #148419
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
Conversation
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
You can test this locally with the following command:git-clang-format --diff HEAD~1 HEAD --extensions cpp -- libcxx/test/extensions/libcxx/localization/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp libcxx/test/std/numerics/c.math/fdelayed-template-parsing.pass.cpp libcxx/test/std/numerics/rand/rand.req/rand.req.urng/valid_int_type.verify.cpp libcxx/test/std/numerics/rand/rand.req/rand.req.urng/valid_real_type.verify.cpp libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/shared_ptr_array.pass.cpp View the diff from clang-format here.diff --git a/libcxx/test/extensions/libcxx/localization/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp b/libcxx/test/extensions/libcxx/localization/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
index a536e6e9b..3e9eb939f 100644
--- a/libcxx/test/extensions/libcxx/localization/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
+++ b/libcxx/test/extensions/libcxx/localization/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
@@ -24,19 +24,18 @@
#include "test_macros.h"
-int main(int, char**)
-{
- typedef std::codecvt_utf8<wchar_t> Codecvt;
- typedef std::wstring_convert<Codecvt> Myconv;
- // create a converter and perform some conversions to generate some
- // interesting state.
- Myconv myconv;
- myconv.from_bytes("\xEF\xBF\xBD");
- const auto old_converted = myconv.converted();
- assert(myconv.converted() == 3);
- // move construct a new converter and make sure the state is the same.
- Myconv myconv2(std::move(myconv));
- assert(myconv2.converted() == old_converted);
+int main(int, char**) {
+ typedef std::codecvt_utf8<wchar_t> Codecvt;
+ typedef std::wstring_convert<Codecvt> Myconv;
+ // create a converter and perform some conversions to generate some
+ // interesting state.
+ Myconv myconv;
+ myconv.from_bytes("\xEF\xBF\xBD");
+ const auto old_converted = myconv.converted();
+ assert(myconv.converted() == 3);
+ // move construct a new converter and make sure the state is the same.
+ Myconv myconv2(std::move(myconv));
+ assert(myconv2.converted() == old_converted);
return 0;
}
diff --git a/libcxx/test/std/numerics/rand/rand.req/rand.req.urng/valid_int_type.verify.cpp b/libcxx/test/std/numerics/rand/rand.req/rand.req.urng/valid_int_type.verify.cpp
index eada7422b..e81814d9a 100644
--- a/libcxx/test/std/numerics/rand/rand.req/rand.req.urng/valid_int_type.verify.cpp
+++ b/libcxx/test/std/numerics/rand/rand.req/rand.req.urng/valid_int_type.verify.cpp
@@ -10,8 +10,7 @@
#include <random>
-void test()
-{
+void test() {
{
std::binomial_distribution<bool> baddist; //expected-error@*:* {{IntType must be a supported integer type}}
std::binomial_distribution<int> okdist;
|
57f8d7c
to
b963772
Compare
@llvm/pr-subscribers-libcxx Author: Nikolas Klauser (philnik777) ChangesFull diff: https://github.com/llvm/llvm-project/pull/148419.diff 6 Files Affected:
diff --git a/libcxx/test/extensions/libcxx/localization/lit.local.cfg b/libcxx/test/extensions/libcxx/localization/lit.local.cfg
new file mode 100644
index 0000000000000..d47f3e0fe4752
--- /dev/null
+++ b/libcxx/test/extensions/libcxx/localization/lit.local.cfg
@@ -0,0 +1,3 @@
+# <locale> tests are obviously not supported when localization support is disabled
+if "no-localization" in config.available_features:
+ config.unsupported = True
diff --git a/libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp b/libcxx/test/extensions/libcxx/localization/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
rename to libcxx/test/extensions/libcxx/localization/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
diff --git a/libcxx/test/libcxx/numerics/c.math/fdelayed-template-parsing.pass.cpp b/libcxx/test/std/numerics/c.math/fdelayed-template-parsing.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/numerics/c.math/fdelayed-template-parsing.pass.cpp
rename to libcxx/test/std/numerics/c.math/fdelayed-template-parsing.pass.cpp
diff --git a/libcxx/test/libcxx/numerics/rand/rand.req.urng/valid_int_type.verify.cpp b/libcxx/test/std/numerics/rand/rand.req/rand.req.urng/valid_int_type.verify.cpp
similarity index 100%
rename from libcxx/test/libcxx/numerics/rand/rand.req.urng/valid_int_type.verify.cpp
rename to libcxx/test/std/numerics/rand/rand.req/rand.req.urng/valid_int_type.verify.cpp
diff --git a/libcxx/test/libcxx/numerics/rand/rand.req.urng/valid_real_type.verify.cpp b/libcxx/test/std/numerics/rand/rand.req/rand.req.urng/valid_real_type.verify.cpp
similarity index 100%
rename from libcxx/test/libcxx/numerics/rand/rand.req.urng/valid_real_type.verify.cpp
rename to libcxx/test/std/numerics/rand/rand.req/rand.req.urng/valid_real_type.verify.cpp
diff --git a/libcxx/test/libcxx/memory/shared_ptr_array.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/shared_ptr_array.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/memory/shared_ptr_array.pass.cpp
rename to libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/shared_ptr_array.pass.cpp
|
ldionne
approved these changes
Jul 16, 2025
This was referenced Jul 23, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.