[libcxx-commits] [PATCH] D154489: [libc++][tests] Fix a test exercising incorrect overload
Piotr Fusik via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 10 21:12:25 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1406f099de94: [libc++][tests] Fix a test exercising incorrect overload (authored by pfusik).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D154489/new/
https://reviews.llvm.org/D154489
Files:
libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/string.move.mode.pass.cpp
Index: libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/string.move.mode.pass.cpp
===================================================================
--- libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/string.move.mode.pass.cpp
+++ libcxx/test/std/input.output/string.streams/stringbuf/stringbuf.cons/string.move.mode.pass.cpp
@@ -29,13 +29,23 @@
static void test() {
{
std::basic_string<CharT> s(STR("testing"));
- const std::basic_stringbuf<CharT, std::char_traits<CharT>, test_allocator<CharT>> buf(std::move(s));
+ const std::basic_stringbuf<CharT> buf(std::move(s));
assert(buf.view() == SV("testing"));
}
{
std::basic_string<CharT> s(STR("testing"));
+ const std::basic_stringbuf<CharT> buf(std::move(s), std::ios_base::out);
+ assert(buf.view() == SV("testing"));
+ }
+ {
+ std::basic_string<CharT, std::char_traits<CharT>, test_allocator<CharT>> s(STR("testing"));
+ const std::basic_stringbuf<CharT, std::char_traits<CharT>, test_allocator<CharT>> buf(std::move(s));
+ assert(buf.view() == SV("testing"));
+ }
+ {
+ std::basic_string<CharT, std::char_traits<CharT>, test_allocator<CharT>> s(STR("testing"));
const std::basic_stringbuf<CharT, std::char_traits<CharT>, test_allocator<CharT>> buf(
- std::move(s), std::ios_base::out);
+ std::move(s), std::ios_base::in);
assert(buf.view() == SV("testing"));
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154489.549236.patch
Type: text/x-patch
Size: 1440 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230811/bcb39d11/attachment.bin>
More information about the libcxx-commits
mailing list