Skip to content

Commit 2d66ab5

Browse files
authored
[libc++][NFC] Run the container tests through clang-format (#126499)
We've been improving these the tests for vector quite a bit and we are probably not done improving our container tests. Formatting everything at once will make subsequent reviews easier.
1 parent 0c95516 commit 2d66ab5

File tree

1,364 files changed

+61236
-70817
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,364 files changed

+61236
-70817
lines changed

libcxx/test/libcxx/containers/associative/map/at.abort.pass.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,11 @@
2323

2424
#include "test_macros.h"
2525

26-
27-
void exit_success(int) {
28-
std::_Exit(EXIT_SUCCESS);
29-
}
26+
void exit_success(int) { std::_Exit(EXIT_SUCCESS); }
3027

3128
int main(int, char**) {
32-
std::signal(SIGABRT, exit_success);
33-
std::map<int, int> map;
34-
map.at(1);
35-
return EXIT_FAILURE;
29+
std::signal(SIGABRT, exit_success);
30+
std::map<int, int> map;
31+
map.at(1);
32+
return EXIT_FAILURE;
3633
}

libcxx/test/libcxx/containers/associative/map/at.const.abort.pass.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,11 @@
2323

2424
#include "test_macros.h"
2525

26-
27-
void exit_success(int) {
28-
std::_Exit(EXIT_SUCCESS);
29-
}
26+
void exit_success(int) { std::_Exit(EXIT_SUCCESS); }
3027

3128
int main(int, char**) {
32-
std::signal(SIGABRT, exit_success);
33-
std::map<int, int> const map;
34-
map.at(1);
35-
return EXIT_FAILURE;
29+
std::signal(SIGABRT, exit_success);
30+
std::map<int, int> const map;
31+
map.at(1);
32+
return EXIT_FAILURE;
3633
}

libcxx/test/libcxx/containers/associative/map/find.modules.compile.pass.mm

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@
1313

1414
#include <map>
1515

16-
void f(std::map<int, int> const& map, int key) {
17-
(void)map.find(key);
18-
}
16+
void f(std::map<int, int> const& map, int key) { (void)map.find(key); }

libcxx/test/libcxx/containers/associative/non_const_comparator.incomplete.verify.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,33 @@
1717
#include <map>
1818
#include <functional>
1919

20-
template <template <typename ...> class Container>
20+
template <template <typename...> class Container>
2121
void test_set() {
22-
struct KeyBase { };
23-
struct KeyDerived; // derives from KeyBase, but incomplete at this point
22+
struct KeyBase {};
23+
struct KeyDerived; // derives from KeyBase, but incomplete at this point
2424

2525
// Name the type but don't instantiate it.
2626
using C = Container<KeyDerived*, std::less<KeyBase*>>;
2727

2828
// Instantiate it but don't ODR use any members.
29-
typename C::value_type dummy; (void)dummy;
29+
typename C::value_type dummy;
30+
(void)dummy;
3031

3132
// Complete the types.
32-
struct KeyDerived : KeyBase { };
33+
struct KeyDerived : KeyBase {};
3334

3435
C c; // ODR use it, which should be OK
3536
}
3637

37-
template <template <typename ...> class Container>
38+
template <template <typename...> class Container>
3839
void test_map() {
39-
struct Value { };
40-
struct KeyBase { };
40+
struct Value {};
41+
struct KeyBase {};
4142
struct KeyDerived;
4243
using C = Container<KeyDerived*, Value, std::less<KeyBase*>>;
43-
typename C::value_type dummy; (void)dummy;
44-
struct KeyDerived : KeyBase { };
44+
typename C::value_type dummy;
45+
(void)dummy;
46+
struct KeyDerived : KeyBase {};
4547
C c;
4648
}
4749

0 commit comments

Comments
 (0)