[libcxx-commits] [PATCH] D141253: [libc++][test] Make some string tests MSVC-friendly
Casey Carter via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 9 14:59:20 PST 2023
CaseyCarter added inline comments.
================
Comment at: libcxx/test/std/strings/basic.string/string.cons/dtor.pass.cpp:48-49
str2 = "long long string so no SSO";
- assert(alloc_stats.alloc_count == 1);
+ assert(alloc_stats.alloc_count > 0);
+ LIBCPP_ASSERT(alloc_stats.alloc_count == 1);
}
----------------
philnik wrote:
> Is this change just academic, or is MSVC actually allocating more than once?
This is yet another manifestation of MSVCSTL containers' additional memory allocation when iterator debugging is active.
================
Comment at: libcxx/test/std/strings/basic.string/string.ops/string_substr/substr_rvalue.pass.cpp:31
+constexpr void test(
+ S orig, typename S::size_type pos, typename S::size_type n, const S expected) {
S str = std::move(orig).substr(pos, n);
----------------
philnik wrote:
> Nit: the formatting looks wrong.
I made these quite long and figured I'd wrap them since nothing in the file was much over 80. I should have simply clang-formatted, which I'll do now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141253/new/
https://reviews.llvm.org/D141253
More information about the libcxx-commits
mailing list