[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:
1 parent
823151f0cf
commit
a40bada91a
417 files changed
+56737
-58203
No files matched your search
+6
-10
@@ -18,12 +18,10 @@
|
||||
#include "min_allocator.h"
|
||||
|
||||
template <class S>
|
||||
TEST_CONSTEXPR_CXX20 void
|
||||
test(S s, const typename S::value_type* str, S expected)
|
||||
{
|
||||
s.assign(str);
|
||||
LIBCPP_ASSERT(s.__invariants());
|
||||
assert(s == expected);
|
||||
TEST_CONSTEXPR_CXX20 void test(S s, const typename S::value_type* str, S expected) {
|
||||
s.assign(str);
|
||||
LIBCPP_ASSERT(s.__invariants());
|
||||
assert(s == expected);
|
||||
}
|
||||
|
||||
template <class S>
|
||||
@@ -38,8 +36,7 @@ TEST_CONSTEXPR_CXX20 void test_string() {
|
||||
|
||||
test(S("12345678901234567890"), "", S());
|
||||
test(S("12345678901234567890"), "12345", S("12345"));
|
||||
test(S("12345678901234567890"), "12345678901234567890",
|
||||
S("12345678901234567890"));
|
||||
test(S("12345678901234567890"), "12345678901234567890", S("12345678901234567890"));
|
||||
}
|
||||
|
||||
TEST_CONSTEXPR_CXX20 bool test() {
|
||||
@@ -65,8 +62,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());
|
||||
|
||||
Reference in new issue
Block a user