[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
@@ -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 S& 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 S& str, int x) {
|
||||
LIBCPP_ASSERT_NOEXCEPT(s.compare(str));
|
||||
assert(sign(s.compare(str)) == sign(x));
|
||||
}
|
||||
|
||||
TEST_CONSTEXPR_CXX20 bool test() {
|
||||
@@ -85,8 +82,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