[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 02:46:44 PDT 2020
mstorsjo created this revision.
mstorsjo added a reviewer: libc++.
Herald added a project: libc++.
Herald added 1 blocking reviewer(s): libc++.
mstorsjo requested review of this revision.
This fixes/silences a few failures on libstdc++ on linux.
Or does the standard actually mandate these strict allocation behaviours here, and libstdc++ violates the standard in this aspect?
Repository:
rG LLVM Github Monorepo
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
@@ -6,7 +6,7 @@
//
//===----------------------------------------------------------------------===//
-// UNSUPPORTED: c++03
+// UNSUPPORTED: c++03, !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.298970.patch
Type: text/x-patch
Size: 2397 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201019/ec9d6769/attachment-0001.bin>
More information about the libcxx-commits
mailing list