forked from boostorg/unordered
Change clang format indentation + .editorconfig file
This commit is contained in:
@@ -19,8 +19,8 @@
|
||||
|
||||
namespace merge_tests {
|
||||
|
||||
UNORDERED_AUTO_TEST(merge_set)
|
||||
{
|
||||
UNORDERED_AUTO_TEST(merge_set)
|
||||
{
|
||||
boost::unordered_set<int> x;
|
||||
boost::unordered_set<int> y;
|
||||
|
||||
@@ -57,10 +57,10 @@ UNORDERED_AUTO_TEST(merge_set)
|
||||
|
||||
test::check_equivalent_keys(x);
|
||||
test::check_equivalent_keys(y);
|
||||
}
|
||||
}
|
||||
|
||||
UNORDERED_AUTO_TEST(merge_multiset)
|
||||
{
|
||||
UNORDERED_AUTO_TEST(merge_multiset)
|
||||
{
|
||||
boost::unordered_multiset<int> x;
|
||||
boost::unordered_multiset<int> y;
|
||||
|
||||
@@ -97,10 +97,10 @@ UNORDERED_AUTO_TEST(merge_multiset)
|
||||
|
||||
test::check_equivalent_keys(x);
|
||||
test::check_equivalent_keys(y);
|
||||
}
|
||||
}
|
||||
|
||||
UNORDERED_AUTO_TEST(merge_set_and_multiset)
|
||||
{
|
||||
UNORDERED_AUTO_TEST(merge_set_and_multiset)
|
||||
{
|
||||
boost::unordered_set<int> x;
|
||||
boost::unordered_multiset<int> y;
|
||||
|
||||
@@ -137,11 +137,11 @@ UNORDERED_AUTO_TEST(merge_set_and_multiset)
|
||||
|
||||
test::check_equivalent_keys(x);
|
||||
test::check_equivalent_keys(y);
|
||||
}
|
||||
}
|
||||
|
||||
template <class X1, class X2>
|
||||
void merge_empty_test(X1*, X2*, test::random_generator generator)
|
||||
{
|
||||
template <class X1, class X2>
|
||||
void merge_empty_test(X1*, X2*, test::random_generator generator)
|
||||
{
|
||||
test::check_instances check_;
|
||||
|
||||
test::random_values<X1> v(1000, generator);
|
||||
@@ -152,11 +152,11 @@ void merge_empty_test(X1*, X2*, test::random_generator generator)
|
||||
BOOST_TEST(x2.empty());
|
||||
test::check_equivalent_keys(x1);
|
||||
test::check_equivalent_keys(x2);
|
||||
}
|
||||
}
|
||||
|
||||
template <class X>
|
||||
void merge_into_empty_test(X*, test::random_generator generator)
|
||||
{
|
||||
template <class X>
|
||||
void merge_into_empty_test(X*, test::random_generator generator)
|
||||
{
|
||||
test::check_instances check_;
|
||||
|
||||
test::random_values<X> v(1000, generator);
|
||||
@@ -167,12 +167,12 @@ void merge_into_empty_test(X*, test::random_generator generator)
|
||||
BOOST_TEST(x2.empty());
|
||||
test::check_equivalent_keys(x1);
|
||||
test::check_equivalent_keys(x2);
|
||||
}
|
||||
}
|
||||
|
||||
template <class X1, class X2>
|
||||
void merge_into_unique_keys_test(X1*, X2*, int hash_equal1, int hash_equal2,
|
||||
template <class X1, class X2>
|
||||
void merge_into_unique_keys_test(X1*, X2*, int hash_equal1, int hash_equal2,
|
||||
test::random_generator generator)
|
||||
{
|
||||
{
|
||||
test::check_instances check_;
|
||||
|
||||
test::random_values<X1> v1(1000, generator);
|
||||
@@ -181,17 +181,17 @@ void merge_into_unique_keys_test(X1*, X2*, int hash_equal1, int hash_equal2,
|
||||
v2.insert(v1.begin(), boost::next(v1.begin(), 100));
|
||||
|
||||
X1 x1(v1.begin(), v1.end(), 0, test::hash(hash_equal1),
|
||||
test::equal_to(hash_equal1));
|
||||
test::equal_to(hash_equal1));
|
||||
X2 x2(v2.begin(), v2.end(), 0, test::hash(hash_equal2),
|
||||
test::equal_to(hash_equal2));
|
||||
test::equal_to(hash_equal2));
|
||||
|
||||
test::ordered<X1> tracker1 = test::create_ordered(x1);
|
||||
test::ordered<X2> tracker2 = test::create_ordered(x2);
|
||||
tracker1.insert(v1.begin(), v1.end());
|
||||
for (typename X2::iterator it = x2.begin(); it != x2.end(); ++it) {
|
||||
if (!tracker1.insert(*it).second) {
|
||||
tracker2.insert(*it);
|
||||
}
|
||||
if (!tracker1.insert(*it).second) {
|
||||
tracker2.insert(*it);
|
||||
}
|
||||
}
|
||||
|
||||
x1.merge(x2);
|
||||
@@ -200,12 +200,12 @@ void merge_into_unique_keys_test(X1*, X2*, int hash_equal1, int hash_equal2,
|
||||
tracker2.compare(x2);
|
||||
test::check_equivalent_keys(x1);
|
||||
test::check_equivalent_keys(x2);
|
||||
}
|
||||
}
|
||||
|
||||
template <class X1, class X2>
|
||||
void merge_into_equiv_keys_test(X1*, X2*, int hash_equal1, int hash_equal2,
|
||||
template <class X1, class X2>
|
||||
void merge_into_equiv_keys_test(X1*, X2*, int hash_equal1, int hash_equal2,
|
||||
test::random_generator generator)
|
||||
{
|
||||
{
|
||||
test::check_instances check_;
|
||||
|
||||
test::random_values<X1> v1(1000, generator);
|
||||
@@ -214,9 +214,9 @@ void merge_into_equiv_keys_test(X1*, X2*, int hash_equal1, int hash_equal2,
|
||||
v2.insert(v1.begin(), boost::next(v1.begin(), 100));
|
||||
|
||||
X1 x1(v1.begin(), v1.end(), 0, test::hash(hash_equal1),
|
||||
test::equal_to(hash_equal1));
|
||||
test::equal_to(hash_equal1));
|
||||
X2 x2(v2.begin(), v2.end(), 0, test::hash(hash_equal2),
|
||||
test::equal_to(hash_equal2));
|
||||
test::equal_to(hash_equal2));
|
||||
x1.merge(x2);
|
||||
|
||||
test::ordered<X1> tracker1 = test::create_ordered(x1);
|
||||
@@ -230,32 +230,32 @@ void merge_into_equiv_keys_test(X1*, X2*, int hash_equal1, int hash_equal2,
|
||||
tracker2.compare(x2);
|
||||
test::check_equivalent_keys(x1);
|
||||
test::check_equivalent_keys(x2);
|
||||
}
|
||||
}
|
||||
|
||||
boost::unordered_set<test::movable, test::hash, test::equal_to,
|
||||
boost::unordered_set<test::movable, test::hash, test::equal_to,
|
||||
std::allocator<test::movable> >* test_set_std_alloc;
|
||||
boost::unordered_multiset<test::movable, test::hash, test::equal_to,
|
||||
boost::unordered_multiset<test::movable, test::hash, test::equal_to,
|
||||
std::allocator<test::movable> >* test_multiset_std_alloc;
|
||||
|
||||
boost::unordered_map<test::object, test::object, test::hash, test::equal_to,
|
||||
boost::unordered_map<test::object, test::object, test::hash, test::equal_to,
|
||||
std::allocator<test::object> >* test_map_std_alloc;
|
||||
boost::unordered_multimap<test::object, test::object, test::hash,
|
||||
boost::unordered_multimap<test::object, test::object, test::hash,
|
||||
test::equal_to, std::allocator<test::object> >* test_multimap_std_alloc;
|
||||
|
||||
boost::unordered_set<test::object, test::hash, test::equal_to,
|
||||
boost::unordered_set<test::object, test::hash, test::equal_to,
|
||||
test::allocator1<test::object> >* test_set;
|
||||
boost::unordered_multiset<test::object, test::hash, test::equal_to,
|
||||
boost::unordered_multiset<test::object, test::hash, test::equal_to,
|
||||
test::allocator1<test::object> >* test_multiset;
|
||||
|
||||
boost::unordered_map<test::movable, test::movable, test::hash, test::equal_to,
|
||||
boost::unordered_map<test::movable, test::movable, test::hash, test::equal_to,
|
||||
test::allocator2<test::movable> >* test_map;
|
||||
boost::unordered_multimap<test::movable, test::movable, test::hash,
|
||||
boost::unordered_multimap<test::movable, test::movable, test::hash,
|
||||
test::equal_to, test::allocator2<test::movable> >* test_multimap;
|
||||
|
||||
using test::default_generator;
|
||||
using test::generate_collisions;
|
||||
using test::default_generator;
|
||||
using test::generate_collisions;
|
||||
|
||||
// clang-format off
|
||||
// clang-format off
|
||||
UNORDERED_TEST(merge_empty_test,
|
||||
((test_set_std_alloc)(test_multiset_std_alloc))
|
||||
((test_set_std_alloc)(test_multiset_std_alloc))
|
||||
@@ -335,7 +335,7 @@ UNORDERED_TEST(merge_into_equiv_keys_test,
|
||||
((0)(1)(2))
|
||||
((0)(1)(2))
|
||||
((default_generator)(generate_collisions)))
|
||||
// clang-format on
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
RUN_TESTS()
|
||||
|
||||
Reference in New Issue
Block a user