[libcxx-commits] [PATCH] D89676: [libcxx] [test] Mark tests that require specific allocation behaviours as libcpp only

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 19 05:46:39 PDT 2020


mstorsjo updated this revision to Diff 299024.
mstorsjo added a comment.

Using `REQUIRES: libc++` instead of `UNSUPPORTED: !libc++`.


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

https://reviews.llvm.org/D89676

Files:
  libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp
  libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp
  libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp


Index: libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp
+++ libcxx/test/std/input.output/filesystems/class.path/path.member/path.native.obs/string_alloc.pass.cpp
@@ -7,6 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03
+// REQUIRES: libc++
 
 // <filesystem>
 
Index: libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp
+++ libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp
@@ -356,7 +356,7 @@
       const char* E = TC.expect;
       PathReserve(LHS, StrLen(E) + 5);
       {
-        DisableAllocationGuard g;
+        LIBCPP_ONLY(DisableAllocationGuard g);
         path& Ref = (LHS += RHS);
         assert(&Ref == &LHS);
       }
@@ -368,14 +368,14 @@
       const char* E = TC.expect;
       PathReserve(LHS, StrLen(E) + 5);
       {
-        DisableAllocationGuard g;
+        LIBCPP_ONLY(DisableAllocationGuard g);
         path& Ref = (LHS += RHS);
         assert(&Ref == &LHS);
       }
       assert(LHS == E);
     }
-    doConcatSourceAllocTest<char>(TC);
-    doConcatSourceAllocTest<wchar_t>(TC);
+    LIBCPP_ONLY(doConcatSourceAllocTest<char>(TC));
+    LIBCPP_ONLY(doConcatSourceAllocTest<wchar_t>(TC));
   }
   for (auto const& TC : CharTestCases) {
     doConcatECharTest<char>(TC);
Index: libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp
+++ libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp
@@ -331,8 +331,8 @@
     doAppendSourceTest<char32_t>(TC);
   }
   for (auto const & TC : LongLHSCases) {
-    doAppendSourceAllocTest<char>(TC);
-    doAppendSourceAllocTest<wchar_t>(TC);
+    LIBCPP_ONLY(doAppendSourceAllocTest<char>(TC));
+    LIBCPP_ONLY(doAppendSourceAllocTest<wchar_t>(TC));
   }
   test_sfinae();
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D89676.299024.patch
Type: text/x-patch
Size: 2382 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201019/cac90e40/attachment-0001.bin>


More information about the libcxx-commits mailing list