[libcxx-commits] [PATCH] D98406: [libcxx] [test] Use a string_view of the native path type in the concat test
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 11 03:13:26 PST 2021
mstorsjo created this revision.
mstorsjo requested review of this revision.
Herald added a project: libc++.
Herald added a reviewer: libc++.
This makes sure that no extra allocations happen on windows, fixing
earlier errors in the DisableAllocationGuard (in the second case that
is modified).
This is split out from D98398 <https://reviews.llvm.org/D98398>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D98406
Files:
libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp
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
@@ -344,7 +344,7 @@
}
{
path LHS((const char*)TC.lhs);
- std::string_view RHS((const char*)TC.rhs);
+ std::basic_string_view<path::value_type> RHS((const path::value_type*)TC.rhs);
path& Ref = (LHS += RHS);
assert(LHS == (const char*)TC.expect);
assert(&Ref == &LHS);
@@ -370,7 +370,7 @@
}
{
path LHS((const char*)TC.lhs);
- std::string_view RHS((const char*)TC.rhs);
+ std::basic_string_view<path::value_type> RHS((const path::value_type*)TC.rhs);
const char* E = TC.expect;
PathReserve(LHS, StrLen(E) + 5);
{
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98406.329902.patch
Type: text/x-patch
Size: 945 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210311/1971ad62/attachment.bin>
More information about the libcxx-commits
mailing list