Skip to content

Conversation

philnik777
Copy link
Contributor

No description provided.

Copy link

github-actions bot commented Jul 13, 2025

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

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;

@philnik777 philnik777 force-pushed the move_tests branch 2 times, most recently from 57f8d7c to b963772 Compare July 16, 2025 08:38
@philnik777 philnik777 marked this pull request as ready for review July 16, 2025 14:25
@philnik777 philnik777 requested a review from a team as a code owner July 16, 2025 14:25
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Jul 16, 2025
@llvmbot
Copy link
Member

llvmbot commented Jul 16, 2025

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/148419.diff

6 Files Affected:

  • (added) libcxx/test/extensions/libcxx/localization/lit.local.cfg (+3)
  • (renamed) libcxx/test/extensions/libcxx/localization/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp ()
  • (renamed) libcxx/test/std/numerics/c.math/fdelayed-template-parsing.pass.cpp ()
  • (renamed) libcxx/test/std/numerics/rand/rand.req/rand.req.urng/valid_int_type.verify.cpp ()
  • (renamed) libcxx/test/std/numerics/rand/rand.req/rand.req.urng/valid_real_type.verify.cpp ()
  • (renamed) libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/shared_ptr_array.pass.cpp ()
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

@philnik777 philnik777 merged commit 4695aea into llvm:main Jul 17, 2025
79 of 80 checks passed
@philnik777 philnik777 deleted the move_tests branch July 17, 2025 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants