Skip to content

Commit afe40b3

Browse files
committed
[libcxx] [test] Mark tests that require specific allocation behaviours as libcpp only
This fixes/silences a few failures on libstdc++ on linux. Differential Revision: https://reviews.llvm.org/D89676
1 parent fa88f61 commit afe40b3

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,8 @@ int main(int, char**)
331331
doAppendSourceTest<char32_t>(TC);
332332
}
333333
for (auto const & TC : LongLHSCases) {
334-
doAppendSourceAllocTest<char>(TC);
335-
doAppendSourceAllocTest<wchar_t>(TC);
334+
LIBCPP_ONLY(doAppendSourceAllocTest<char>(TC));
335+
LIBCPP_ONLY(doAppendSourceAllocTest<wchar_t>(TC));
336336
}
337337
test_sfinae();
338338

libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ int main(int, char**)
356356
const char* E = TC.expect;
357357
PathReserve(LHS, StrLen(E) + 5);
358358
{
359-
DisableAllocationGuard g;
359+
LIBCPP_ONLY(DisableAllocationGuard g);
360360
path& Ref = (LHS += RHS);
361361
assert(&Ref == &LHS);
362362
}
@@ -368,14 +368,14 @@ int main(int, char**)
368368
const char* E = TC.expect;
369369
PathReserve(LHS, StrLen(E) + 5);
370370
{
371-
DisableAllocationGuard g;
371+
LIBCPP_ONLY(DisableAllocationGuard g);
372372
path& Ref = (LHS += RHS);
373373
assert(&Ref == &LHS);
374374
}
375375
assert(LHS == E);
376376
}
377-
doConcatSourceAllocTest<char>(TC);
378-
doConcatSourceAllocTest<wchar_t>(TC);
377+
LIBCPP_ONLY(doConcatSourceAllocTest<char>(TC));
378+
LIBCPP_ONLY(doConcatSourceAllocTest<wchar_t>(TC));
379379
}
380380
for (auto const& TC : CharTestCases) {
381381
doConcatECharTest<char>(TC);

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
// UNSUPPORTED: c++03
10+
// REQUIRES: libc++
1011

1112
// <filesystem>
1213

0 commit comments

Comments
 (0)