[libcxx-commits] [PATCH] D102360: [libcxx] [test] Change the generic_string_alloc test to do a conversion that also does something on windows
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu May 13 08:00:16 PDT 2021
mstorsjo updated this revision to Diff 345149.
mstorsjo added a comment.
Rerun CI
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102360/new/
https://reviews.llvm.org/D102360
Files:
libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp
Index: libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp
===================================================================
--- libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp
+++ libcxx/test/std/input.output/filesystems/class.path/path.member/path.generic.obs/generic_string_alloc.pass.cpp
@@ -39,17 +39,19 @@
int main(int, char**)
{
using namespace fs;
- using CharT = wchar_t;
+ using CharT = char32_t;
using Traits = std::char_traits<CharT>;
using Alloc = malloc_allocator<CharT>;
using Str = std::basic_string<CharT, Traits, Alloc>;
- const wchar_t* expect = longString;
+ const CharT* expect = longString;
const path p((const char*)longString);
{
- DisableAllocationGuard g;
+ // On Windows, charset conversions cause allocations outside of the
+ // provided allocator.
+ TEST_NOT_WIN32(DisableAllocationGuard g);
Alloc a;
Alloc::disable_default_constructor = true;
- Str s = p.generic_string<wchar_t, Traits, Alloc>(a);
+ Str s = p.generic_string<CharT, Traits, Alloc>(a);
assert(s == expect);
assert(Alloc::alloc_count > 0);
assert(Alloc::outstanding_alloc() == 1);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102360.345149.patch
Type: text/x-patch
Size: 1266 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210513/68f485d3/attachment.bin>
More information about the libcxx-commits
mailing list