Skip to content

[libc++] Move more tests into test/extensions #152975

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

philnik777
Copy link
Contributor

This should be the last set of tests moved to test/extensions for now.

@philnik777 philnik777 requested a review from a team as a code owner August 11, 2025 08:57
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Aug 11, 2025
@llvmbot
Copy link
Member

llvmbot commented Aug 11, 2025

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

Changes

This should be the last set of tests moved to test/extensions for now.


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

18 Files Affected:

  • (renamed) libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp ()
  • (renamed) libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_lock_guard.pass.cpp ()
  • (renamed) libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp ()
  • (renamed) libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_missing_unlock.verify.cpp ()
  • (renamed) libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_requires_capability.pass.cpp ()
  • (renamed) libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp ()
  • (renamed) libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp ()
  • (renamed) libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.cons/test.dat ()
  • (renamed) libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp ()
  • (renamed) libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp ()
  • (renamed) libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.members/test.dat ()
  • (renamed) libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp ()
  • (renamed) libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp ()
  • (renamed) libcxx/test/extensions/libcxx/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp ()
  • (renamed) libcxx/test/extensions/libcxx/odr_signature.exceptions.sh.cpp ()
  • (renamed) libcxx/test/extensions/libcxx/odr_signature.hardening.sh.cpp ()
  • (renamed) libcxx/test/extensions/libcxx/strings/basic.string/string.capacity/PR53170.pass.cpp ()
  • (renamed) libcxx/test/extensions/posix/xopen_source.gen.py ()
diff --git a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp b/libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
rename to libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
diff --git a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp b/libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_lock_guard.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp
rename to libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_lock_guard.pass.cpp
diff --git a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp b/libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp
rename to libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp
diff --git a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.verify.cpp b/libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_missing_unlock.verify.cpp
similarity index 100%
rename from libcxx/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.verify.cpp
rename to libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_missing_unlock.verify.cpp
diff --git a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp b/libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_requires_capability.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp
rename to libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_requires_capability.pass.cpp
diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp
rename to libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp
diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp
rename to libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp
diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.cons/test.dat b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.cons/test.dat
similarity index 100%
rename from libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.cons/test.dat
rename to libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.cons/test.dat
diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp
rename to libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp
diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp
rename to libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp
diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.members/test.dat b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.members/test.dat
similarity index 100%
rename from libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.members/test.dat
rename to libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.members/test.dat
diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp
rename to libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp
diff --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp
rename to libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp
diff --git a/libcxx/test/libcxx/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp b/libcxx/test/extensions/libcxx/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp
rename to libcxx/test/extensions/libcxx/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp
diff --git a/libcxx/test/libcxx/odr_signature.exceptions.sh.cpp b/libcxx/test/extensions/libcxx/odr_signature.exceptions.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/odr_signature.exceptions.sh.cpp
rename to libcxx/test/extensions/libcxx/odr_signature.exceptions.sh.cpp
diff --git a/libcxx/test/libcxx/odr_signature.hardening.sh.cpp b/libcxx/test/extensions/libcxx/odr_signature.hardening.sh.cpp
similarity index 100%
rename from libcxx/test/libcxx/odr_signature.hardening.sh.cpp
rename to libcxx/test/extensions/libcxx/odr_signature.hardening.sh.cpp
diff --git a/libcxx/test/libcxx/strings/basic.string/string.capacity/PR53170.pass.cpp b/libcxx/test/extensions/libcxx/strings/basic.string/string.capacity/PR53170.pass.cpp
similarity index 100%
rename from libcxx/test/libcxx/strings/basic.string/string.capacity/PR53170.pass.cpp
rename to libcxx/test/extensions/libcxx/strings/basic.string/string.capacity/PR53170.pass.cpp
diff --git a/libcxx/test/libcxx/xopen_source.gen.py b/libcxx/test/extensions/posix/xopen_source.gen.py
similarity index 100%
rename from libcxx/test/libcxx/xopen_source.gen.py
rename to libcxx/test/extensions/posix/xopen_source.gen.py

Copy link

⚠️ 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/clang/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_lock_guard.pass.cpp libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_missing_unlock.verify.cpp libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_requires_capability.pass.cpp libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp libcxx/test/extensions/libcxx/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp libcxx/test/extensions/libcxx/odr_signature.exceptions.sh.cpp libcxx/test/extensions/libcxx/odr_signature.hardening.sh.cpp libcxx/test/extensions/libcxx/strings/basic.string/string.capacity/PR53170.pass.cpp
View the diff from clang-format here.
diff --git a/libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_requires_capability.pass.cpp b/libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_requires_capability.pass.cpp
index e9794acc8..ca3beacec 100644
--- a/libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_requires_capability.pass.cpp
+++ b/libcxx/test/extensions/clang/thread/thread.mutex/thread_safety_requires_capability.pass.cpp
@@ -24,9 +24,7 @@
 std::mutex m;
 int foo __attribute__((guarded_by(m)));
 
-void increment() __attribute__((requires_capability(m))) {
-  foo++;
-}
+void increment() __attribute__((requires_capability(m))) { foo++; }
 
 int main(int, char**) {
   m.lock();
diff --git a/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp
index 652783fc6..6d7a04c91 100644
--- a/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp
+++ b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp
@@ -26,27 +26,25 @@
 #include "wide_temp_file.h"
 
 int main(int, char**) {
-    std::wstring temp = get_wide_temp_file_name();
-    {
-        std::fstream fs(temp.c_str(), std::ios_base::in | std::ios_base::out
-                                                | std::ios_base::trunc);
-        double x = 0;
-        fs << 3.25;
-        fs.seekg(0);
-        fs >> x;
-        assert(x == 3.25);
-    }
-    _wremove(temp.c_str());
-    {
-        std::wfstream fs(temp.c_str(), std::ios_base::in | std::ios_base::out
-                                                 | std::ios_base::trunc);
-        double x = 0;
-        fs << 3.25;
-        fs.seekg(0);
-        fs >> x;
-        assert(x == 3.25);
-    }
-    _wremove(temp.c_str());
-
-    return 0;
+  std::wstring temp = get_wide_temp_file_name();
+  {
+    std::fstream fs(temp.c_str(), std::ios_base::in | std::ios_base::out | std::ios_base::trunc);
+    double x = 0;
+    fs << 3.25;
+    fs.seekg(0);
+    fs >> x;
+    assert(x == 3.25);
+  }
+  _wremove(temp.c_str());
+  {
+    std::wfstream fs(temp.c_str(), std::ios_base::in | std::ios_base::out | std::ios_base::trunc);
+    double x = 0;
+    fs << 3.25;
+    fs.seekg(0);
+    fs >> x;
+    assert(x == 3.25);
+  }
+  _wremove(temp.c_str());
+
+  return 0;
 }
diff --git a/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp
index b592492f8..5bf582043 100644
--- a/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp
+++ b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp
@@ -26,33 +26,31 @@
 #include "wide_temp_file.h"
 
 int main(int, char**) {
-    std::wstring temp = get_wide_temp_file_name();
-    {
-        std::fstream fs;
-        assert(!fs.is_open());
-        fs.open(temp.c_str(), std::ios_base::in | std::ios_base::out
-                                        | std::ios_base::trunc);
-        assert(fs.is_open());
-        double x = 0;
-        fs << 3.25;
-        fs.seekg(0);
-        fs >> x;
-        assert(x == 3.25);
-    }
-    _wremove(temp.c_str());
-    {
-        std::wfstream fs;
-        assert(!fs.is_open());
-        fs.open(temp.c_str(), std::ios_base::in | std::ios_base::out
-                                        | std::ios_base::trunc);
-        assert(fs.is_open());
-        double x = 0;
-        fs << 3.25;
-        fs.seekg(0);
-        fs >> x;
-        assert(x == 3.25);
-    }
-    _wremove(temp.c_str());
-
-    return 0;
+  std::wstring temp = get_wide_temp_file_name();
+  {
+    std::fstream fs;
+    assert(!fs.is_open());
+    fs.open(temp.c_str(), std::ios_base::in | std::ios_base::out | std::ios_base::trunc);
+    assert(fs.is_open());
+    double x = 0;
+    fs << 3.25;
+    fs.seekg(0);
+    fs >> x;
+    assert(x == 3.25);
+  }
+  _wremove(temp.c_str());
+  {
+    std::wfstream fs;
+    assert(!fs.is_open());
+    fs.open(temp.c_str(), std::ios_base::in | std::ios_base::out | std::ios_base::trunc);
+    assert(fs.is_open());
+    double x = 0;
+    fs << 3.25;
+    fs.seekg(0);
+    fs >> x;
+    assert(x == 3.25);
+  }
+  _wremove(temp.c_str());
+
+  return 0;
 }
diff --git a/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp
index 18e9b2910..e791184a2 100644
--- a/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp
+++ b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp
@@ -25,24 +25,24 @@
 #include "test_macros.h"
 
 int main(int, char**) {
-    {
-        std::ifstream fs(L"test.dat");
-        double x = 0;
-        fs >> x;
-        assert(x == 3.25);
-    }
-    // std::ifstream(const wchar_t*, std::ios_base::openmode) is tested in
-    // test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp
-    // which creates writable files.
-    {
-        std::wifstream fs(L"test.dat");
-        double x = 0;
-        fs >> x;
-        assert(x == 3.25);
-    }
-    // std::wifstream(const wchar_t*, std::ios_base::openmode) is tested in
-    // test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp
-    // which creates writable files.
-
-    return 0;
+  {
+    std::ifstream fs(L"test.dat");
+    double x = 0;
+    fs >> x;
+    assert(x == 3.25);
+  }
+  // std::ifstream(const wchar_t*, std::ios_base::openmode) is tested in
+  // test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp
+  // which creates writable files.
+  {
+    std::wifstream fs(L"test.dat");
+    double x = 0;
+    fs >> x;
+    assert(x == 3.25);
+  }
+  // std::wifstream(const wchar_t*, std::ios_base::openmode) is tested in
+  // test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp
+  // which creates writable files.
+
+  return 0;
 }
diff --git a/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp
index 3fa8a29e2..ea5054b3d 100644
--- a/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp
+++ b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp
@@ -25,30 +25,30 @@
 #include "test_macros.h"
 
 int main(int, char**) {
-    {
-        std::ifstream fs;
-        assert(!fs.is_open());
-        char c = 'a';
-        fs >> c;
-        assert(fs.fail());
-        assert(c == 'a');
-        fs.open(L"test.dat");
-        assert(fs.is_open());
-        fs >> c;
-        assert(c == 'r');
-    }
-    {
-        std::wifstream fs;
-        assert(!fs.is_open());
-        wchar_t c = L'a';
-        fs >> c;
-        assert(fs.fail());
-        assert(c == L'a');
-        fs.open(L"test.dat");
-        assert(fs.is_open());
-        fs >> c;
-        assert(c == L'r');
-    }
-
-    return 0;
+  {
+    std::ifstream fs;
+    assert(!fs.is_open());
+    char c = 'a';
+    fs >> c;
+    assert(fs.fail());
+    assert(c == 'a');
+    fs.open(L"test.dat");
+    assert(fs.is_open());
+    fs >> c;
+    assert(c == 'r');
+  }
+  {
+    std::wifstream fs;
+    assert(!fs.is_open());
+    wchar_t c = L'a';
+    fs >> c;
+    assert(fs.fail());
+    assert(c == L'a');
+    fs.open(L"test.dat");
+    assert(fs.is_open());
+    fs >> c;
+    assert(c == L'r');
+  }
+
+  return 0;
 }
diff --git a/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp
index 3730e7364..aabdfe407 100644
--- a/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp
+++ b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp
@@ -26,41 +26,41 @@
 #include "wide_temp_file.h"
 
 int main(int, char**) {
-    std::wstring temp = get_wide_temp_file_name();
-    {
-        std::ofstream fs(temp.c_str());
-        fs << 3.25;
-    }
-    {
-        std::ifstream fs(temp.c_str());
-        double x = 0;
-        fs >> x;
-        assert(x == 3.25);
-    }
-    {
-        std::ifstream fs(temp.c_str(), std::ios_base::out);
-        double x = 0;
-        fs >> x;
-        assert(x == 3.25);
-    }
-    _wremove(temp.c_str());
-    {
-        std::wofstream fs(temp.c_str());
-        fs << 3.25;
-    }
-    {
-        std::wifstream fs(temp.c_str());
-        double x = 0;
-        fs >> x;
-        assert(x == 3.25);
-    }
-    {
-        std::wifstream fs(temp.c_str(), std::ios_base::out);
-        double x = 0;
-        fs >> x;
-        assert(x == 3.25);
-    }
-    _wremove(temp.c_str());
+  std::wstring temp = get_wide_temp_file_name();
+  {
+    std::ofstream fs(temp.c_str());
+    fs << 3.25;
+  }
+  {
+    std::ifstream fs(temp.c_str());
+    double x = 0;
+    fs >> x;
+    assert(x == 3.25);
+  }
+  {
+    std::ifstream fs(temp.c_str(), std::ios_base::out);
+    double x = 0;
+    fs >> x;
+    assert(x == 3.25);
+  }
+  _wremove(temp.c_str());
+  {
+    std::wofstream fs(temp.c_str());
+    fs << 3.25;
+  }
+  {
+    std::wifstream fs(temp.c_str());
+    double x = 0;
+    fs >> x;
+    assert(x == 3.25);
+  }
+  {
+    std::wifstream fs(temp.c_str(), std::ios_base::out);
+    double x = 0;
+    fs >> x;
+    assert(x == 3.25);
+  }
+  _wremove(temp.c_str());
 
-    return 0;
+  return 0;
 }
diff --git a/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp
index bfbbd5322..600901008 100644
--- a/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp
+++ b/libcxx/test/extensions/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp
@@ -26,41 +26,41 @@
 #include "wide_temp_file.h"
 
 int main(int, char**) {
-    std::wstring temp = get_wide_temp_file_name();
-    {
-        std::ofstream fs;
-        assert(!fs.is_open());
-        char c = 'a';
-        fs << c;
-        assert(fs.fail());
-        fs.open(temp.c_str());
-        assert(fs.is_open());
-        fs << c;
-    }
-    {
-        std::ifstream fs(temp.c_str());
-        char c = 0;
-        fs >> c;
-        assert(c == 'a');
-    }
-    _wremove(temp.c_str());
-    {
-        std::wofstream fs;
-        assert(!fs.is_open());
-        wchar_t c = L'a';
-        fs << c;
-        assert(fs.fail());
-        fs.open(temp.c_str());
-        assert(fs.is_open());
-        fs << c;
-    }
-    {
-        std::wifstream fs(temp.c_str());
-        wchar_t c = 0;
-        fs >> c;
-        assert(c == L'a');
-    }
-    _wremove(temp.c_str());
+  std::wstring temp = get_wide_temp_file_name();
+  {
+    std::ofstream fs;
+    assert(!fs.is_open());
+    char c = 'a';
+    fs << c;
+    assert(fs.fail());
+    fs.open(temp.c_str());
+    assert(fs.is_open());
+    fs << c;
+  }
+  {
+    std::ifstream fs(temp.c_str());
+    char c = 0;
+    fs >> c;
+    assert(c == 'a');
+  }
+  _wremove(temp.c_str());
+  {
+    std::wofstream fs;
+    assert(!fs.is_open());
+    wchar_t c = L'a';
+    fs << c;
+    assert(fs.fail());
+    fs.open(temp.c_str());
+    assert(fs.is_open());
+    fs << c;
+  }
+  {
+    std::wifstream fs(temp.c_str());
+    wchar_t c = 0;
+    fs >> c;
+    assert(c == L'a');
+  }
+  _wremove(temp.c_str());
 
-    return 0;
+  return 0;
 }
diff --git a/libcxx/test/extensions/libcxx/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp b/libcxx/test/extensions/libcxx/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp
index c856c931f..3f9c66033 100644
--- a/libcxx/test/extensions/libcxx/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp
+++ b/libcxx/test/extensions/libcxx/iterators/stream.iterators/ostreambuf.iterator/ostreambuf.iter.ops/failed.pass.cpp
@@ -19,17 +19,16 @@
 
 #include "test_macros.h"
 
-int main(int, char**)
-{
-    {
-        std::ostreambuf_iterator<char> i(nullptr);
-        assert(i.failed());
-    }
+int main(int, char**) {
+  {
+    std::ostreambuf_iterator<char> i(nullptr);
+    assert(i.failed());
+  }
 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
-    {
-        std::ostreambuf_iterator<wchar_t> i(nullptr);
-        assert(i.failed());
-    }
+  {
+    std::ostreambuf_iterator<wchar_t> i(nullptr);
+    assert(i.failed());
+  }
 #endif
 
   return 0;

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.

2 participants