[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

@@ -16,21 +16,18 @@
#include "test_macros.h"
#include "min_allocator.h"
TEST_CONSTEXPR_CXX20 int sign(int x)
{
if (x == 0)
return 0;
if (x < 0)
return -1;
return 1;
TEST_CONSTEXPR_CXX20 int sign(int x) {
if (x == 0)
return 0;
if (x < 0)
return -1;
return 1;
}
template <class S>
TEST_CONSTEXPR_CXX20 void
test(const S& s, const typename S::value_type* str, int x)
{
LIBCPP_ASSERT_NOEXCEPT(s.compare(str));
assert(sign(s.compare(str)) == sign(x));
TEST_CONSTEXPR_CXX20 void test(const S& s, const typename S::value_type* str, int x) {
LIBCPP_ASSERT_NOEXCEPT(s.compare(str));
assert(sign(s.compare(str)) == sign(x));
}
TEST_CONSTEXPR_CXX20 bool test() {
@@ -78,8 +75,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());