[libcxx-commits] [PATCH] D98954: [libcxx] [test] Don't leave test dirs behind in fs.op.current_path on Windows

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Mar 22 14:41:20 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG4c402ae880cf: [libcxx] [test] Don't leave test dirs behind in fs.op.current_path on Windows (authored by mstorsjo).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98954/new/

https://reviews.llvm.org/D98954

Files:
  libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.current_path/current_path.pass.cpp


Index: libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.current_path/current_path.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.current_path/current_path.pass.cpp
+++ libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.current_path/current_path.pass.cpp
@@ -51,8 +51,8 @@
 
 TEST_CASE(current_path_after_change_test)
 {
-    CWDGuard guard;
     static_test_env static_env;
+    CWDGuard guard;
     const path new_path = static_env.Dir;
     current_path(new_path);
     TEST_CHECK(current_path() == new_path);
@@ -60,8 +60,8 @@
 
 TEST_CASE(current_path_is_file_test)
 {
-    CWDGuard guard;
     static_test_env static_env;
+    CWDGuard guard;
     const path p = static_env.File;
     std::error_code ec;
     const path old_p = current_path();
@@ -72,8 +72,8 @@
 
 TEST_CASE(set_to_non_absolute_path)
 {
-    CWDGuard guard;
     static_test_env static_env;
+    CWDGuard guard;
     const path base = static_env.Dir;
     current_path(base);
     const path p = static_env.Dir2.filename();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98954.332428.patch
Type: text/x-patch
Size: 1108 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210322/5bef5a9a/attachment-0001.bin>


More information about the libcxx-commits mailing list