Skip to content

Commit 81986a6

Browse files
clang-format some test files
1 parent e70a02f commit 81986a6

File tree

2 files changed

+19
-26
lines changed

2 files changed

+19
-26
lines changed

libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/stable_partition.pass.cpp

+16-23
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,16 @@
2323
#include "test_iterators.h"
2424
#include "test_macros.h"
2525

26-
struct is_odd
27-
{
28-
TEST_CONSTEXPR_CXX26 bool operator()(const int& i) const {return i & 1;}
26+
struct is_odd {
27+
TEST_CONSTEXPR_CXX26 bool operator()(const int& i) const { return i & 1; }
2928
};
3029

31-
struct odd_first
32-
{
33-
TEST_CONSTEXPR_CXX26 bool operator()(const std::pair<int,int>& p) const
34-
{return p.first & 1;}
30+
struct odd_first {
31+
TEST_CONSTEXPR_CXX26 bool operator()(const std::pair<int, int>& p) const { return p.first & 1; }
3532
};
3633

3734
template <class Iter>
38-
TEST_CONSTEXPR_CXX26 void
39-
test()
40-
{
35+
TEST_CONSTEXPR_CXX26 void test() {
4136
{ // check mixed
4237
typedef std::pair<int,int> P;
4338
P array[] =
@@ -285,8 +280,7 @@ test()
285280
// TODO: Re-enable this test for GCC once we get recursive inlining fixed.
286281
// For now it trips up GCC due to the use of always_inline.
287282
# if !defined(TEST_COMPILER_GCC)
288-
if (!TEST_IS_CONSTANT_EVALUATED)
289-
{ // check that the algorithm still works when no memory is available
283+
if (!TEST_IS_CONSTANT_EVALUATED) { // check that the algorithm still works when no memory is available
290284
std::vector<int> vec(150, 3);
291285
vec[5] = 6;
292286
getGlobalMemCounter()->throw_after = 0;
@@ -307,20 +301,19 @@ test()
307301

308302
#if TEST_STD_VER >= 11
309303

310-
struct is_null
311-
{
312-
template <class P>
313-
TEST_CONSTEXPR_CXX26 bool operator()(const P& p) {return p == 0;}
304+
struct is_null {
305+
template <class P>
306+
TEST_CONSTEXPR_CXX26 bool operator()(const P& p) {
307+
return p == 0;
308+
}
314309
};
315310

316311
template <class Iter>
317-
TEST_CONSTEXPR_CXX26 void
318-
test1()
319-
{
320-
const unsigned size = 5;
321-
std::unique_ptr<int> array[size];
322-
Iter r = std::stable_partition(Iter(array), Iter(array+size), is_null());
323-
assert(r == Iter(array+size));
312+
TEST_CONSTEXPR_CXX26 void test1() {
313+
const unsigned size = 5;
314+
std::unique_ptr<int> array[size];
315+
Iter r = std::stable_partition(Iter(array), Iter(array + size), is_null());
316+
assert(r == Iter(array + size));
324317
}
325318

326319
#endif // TEST_STD_VER >= 11

libcxx/test/std/algorithms/robust_against_proxy_iterators_lifetime_bugs.pass.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -739,15 +739,15 @@ TEST_CONSTEXPR_CXX20 bool test() {
739739
if (!TEST_IS_CONSTANT_EVALUATED)
740740
#endif
741741
{
742-
test(simple_in, [&](I b, I e) { (void) std::stable_partition(b, e, is_neg); });
742+
test(simple_in, [&](I b, I e) { (void)std::stable_partition(b, e, is_neg); });
743743
}
744744
if (!TEST_IS_CONSTANT_EVALUATED)
745-
test(sort_test_in, [&](I b, I e) { (void) std::sort(b, e); });
745+
test(sort_test_in, [&](I b, I e) { (void)std::sort(b, e); });
746746
#if TEST_STD_VER < 26
747747
if (!TEST_IS_CONSTANT_EVALUATED)
748748
#endif
749749
{
750-
test(sort_test_in, [&](I b, I e) { (void) std::stable_sort(b, e); });
750+
test(sort_test_in, [&](I b, I e) { (void)std::stable_sort(b, e); });
751751
}
752752
// TODO: partial_sort
753753
// TODO: nth_element

0 commit comments

Comments
 (0)