llvm-project/libcxx/test/std/strings/basic.string/string.capacity
Marek Kurdej 841132efda [libc++] [P0966] [C++20] Fix bug PR45368 by correctly implementing P0966: string::reserve should not shrink.
This patch fixes the implementation as well as the tests that didn't actually test the wanted behaviour.
You'll find all the details in the bug report.
It adds as well deprecation warning for reserve() (without argument) and adds a test.

http://wg21.link/P0966R1
https://bugs.llvm.org/show_bug.cgi?id=45368
https://reviews.llvm.org/D54992

Reviewed By: ldionne, #libc

Differential Revision: https://reviews.llvm.org/D91778
2020-11-26 10:13:12 +01:00
..
capacity.pass.cpp
clear.pass.cpp Add include for 'test_macros.h' to all the tests that were missing them. Thanks to Zoe for the (big, but simple) patch. NFC intended. 2019-05-31 18:35:30 +00:00
empty.pass.cpp
empty.verify.cpp [libc++] Remove the c++98 Lit feature from the test suite 2020-06-03 09:37:22 -04:00
length.pass.cpp Add include for 'test_macros.h' to all the tests that were missing them. Thanks to Zoe for the (big, but simple) patch. NFC intended. 2019-05-31 18:35:30 +00:00
max_size.pass.cpp [libc++/abi/unwind] Rename Lit features for no exceptions to 'no-exceptions' 2020-04-22 08:25:27 -04:00
over_max_size.pass.cpp [libc++/abi/unwind] Rename Lit features for no exceptions to 'no-exceptions' 2020-04-22 08:25:27 -04:00
reserve.deprecated_in_cxx20.verify.cpp [libc++] [P0966] [C++20] Fix bug PR45368 by correctly implementing P0966: string::reserve should not shrink. 2020-11-26 10:13:12 +01:00
reserve.pass.cpp [libc++] [P0966] [C++20] Fix bug PR45368 by correctly implementing P0966: string::reserve should not shrink. 2020-11-26 10:13:12 +01:00
reserve_size.pass.cpp [libc++] [P0966] [C++20] Fix bug PR45368 by correctly implementing P0966: string::reserve should not shrink. 2020-11-26 10:13:12 +01:00
resize_size.pass.cpp [libc++] NFC: Clean up a lot of old Lit features 2020-04-10 17:20:29 -04:00
resize_size_char.pass.cpp [libc++] NFC: Clean up a lot of old Lit features 2020-04-10 17:20:29 -04:00
shrink_to_fit.pass.cpp
size.pass.cpp Add include for 'test_macros.h' to all the tests that were missing them. Thanks to Zoe for the (big, but simple) patch. NFC intended. 2019-05-31 18:35:30 +00:00