[libcxx-commits] [PATCH] D141253: [libc++][test] Make some string tests MSVC-friendly
Nikolas Klauser via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 9 03:53:33 PST 2023
philnik accepted this revision.
philnik added a comment.
This revision is now accepted and ready to land.
LGTM % nit.
================
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);
}
----------------
Is this change just academic, or is MSVC actually allocating more than once?
================
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);
----------------
Nit: the formatting looks wrong.
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