[libc++] Apply clang formatting to all string unit tests

This applies clang-format to the std::string unit tests in preparation
for landing https://reviews.llvm.org/D140550.

Differential Revision: https://reviews.llvm.org/D140612
This commit is contained in:
Brendan Emery authored and Louis Dionne committed 2023-09-01 13:35:18 -04:00
1 parent 823151f0cf
commit a40bada91a
417 files changed
+56737 -58203

No files matched your search

@@ -18,12 +18,10 @@
#include "min_allocator.h"
template <class S>
TEST_CONSTEXPR_CXX20 void
test(S s, S str, S expected)
{
s.append(str);
LIBCPP_ASSERT(s.__invariants());
assert(s == expected);
TEST_CONSTEXPR_CXX20 void test(S s, S str, S expected) {
s.append(str);
LIBCPP_ASSERT(s.__invariants());
assert(s == expected);
}
template <class S>
@@ -46,8 +44,7 @@ TEST_CONSTEXPR_CXX20 void test_string() {
test(S("12345678901234567890"), S(), S("12345678901234567890"));
test(S("12345678901234567890"), S("12345"), S("1234567890123456789012345"));
test(S("12345678901234567890"), S("1234567890"), S("123456789012345678901234567890"));
test(S("12345678901234567890"), S("12345678901234567890"),
S("1234567890123456789012345678901234567890"));
test(S("12345678901234567890"), S("12345678901234567890"), S("1234567890123456789012345678901234567890"));
}
TEST_CONSTEXPR_CXX20 bool test() {
@@ -57,7 +54,7 @@ TEST_CONSTEXPR_CXX20 bool test() {
#endif
#if TEST_STD_VER >= 11
{ // LWG 2946
{ // LWG 2946
std::string s;
s.append({"abc", 1});
assert(s.size() == 1);
@@ -68,8 +65,7 @@ TEST_CONSTEXPR_CXX20 bool test() {
return true;
}
int main(int, char**)
{
int main(int, char**) {
test();
#if TEST_STD_VER > 17
static_assert(test());