mirror of
https://github.com/boostorg/unordered.git
synced 2025-11-06 10:41:38 +01:00
Reformat with clang-format
This commit is contained in:
@@ -17,9 +17,9 @@
|
||||
#include <set>
|
||||
#include <iostream>
|
||||
|
||||
namespace insert_hint
|
||||
namespace insert_hint {
|
||||
UNORDERED_AUTO_TEST(insert_hint_empty)
|
||||
{
|
||||
UNORDERED_AUTO_TEST(insert_hint_empty) {
|
||||
typedef boost::unordered_multiset<int> container;
|
||||
container x;
|
||||
x.insert(x.cbegin(), 10);
|
||||
@@ -28,7 +28,8 @@ UNORDERED_AUTO_TEST(insert_hint_empty) {
|
||||
test::check_equivalent_keys(x);
|
||||
}
|
||||
|
||||
UNORDERED_AUTO_TEST(insert_hint_empty2) {
|
||||
UNORDERED_AUTO_TEST(insert_hint_empty2)
|
||||
{
|
||||
typedef boost::unordered_multimap<std::string, int> container;
|
||||
container x;
|
||||
x.emplace_hint(x.cbegin(), "hello", 50);
|
||||
@@ -38,7 +39,8 @@ UNORDERED_AUTO_TEST(insert_hint_empty2) {
|
||||
test::check_equivalent_keys(x);
|
||||
}
|
||||
|
||||
UNORDERED_AUTO_TEST(insert_hint_single) {
|
||||
UNORDERED_AUTO_TEST(insert_hint_single)
|
||||
{
|
||||
typedef boost::unordered_multiset<std::string> container;
|
||||
container x;
|
||||
x.insert("equal");
|
||||
@@ -48,7 +50,8 @@ UNORDERED_AUTO_TEST(insert_hint_single) {
|
||||
test::check_equivalent_keys(x);
|
||||
}
|
||||
|
||||
UNORDERED_AUTO_TEST(insert_hint_single2) {
|
||||
UNORDERED_AUTO_TEST(insert_hint_single2)
|
||||
{
|
||||
typedef boost::unordered_multimap<int, std::string> container;
|
||||
container x;
|
||||
x.emplace(10, "one");
|
||||
@@ -67,18 +70,23 @@ UNORDERED_AUTO_TEST(insert_hint_single2) {
|
||||
test::check_equivalent_keys(x);
|
||||
}
|
||||
|
||||
UNORDERED_AUTO_TEST(insert_hint_multiple) {
|
||||
UNORDERED_AUTO_TEST(insert_hint_multiple)
|
||||
{
|
||||
for (unsigned int size = 0; size < 10; ++size) {
|
||||
for (unsigned int offset = 0; offset <= size; ++offset) {
|
||||
for (unsigned int offset = 0; offset <= size; ++offset) {
|
||||
typedef boost::unordered_multiset<std::string> container;
|
||||
container x;
|
||||
|
||||
for (unsigned int i = 0; i < size; ++i) { x.insert("multiple"); }
|
||||
for (unsigned int i = 0; i < size; ++i) {
|
||||
x.insert("multiple");
|
||||
}
|
||||
|
||||
BOOST_TEST_EQ(x.size(), size);
|
||||
|
||||
container::const_iterator position = x.cbegin();
|
||||
for (unsigned int i = 0; i < offset; ++i) { ++position; }
|
||||
for (unsigned int i = 0; i < offset; ++i) {
|
||||
++position;
|
||||
}
|
||||
|
||||
x.insert(position, "multiple");
|
||||
|
||||
@@ -89,7 +97,8 @@ UNORDERED_AUTO_TEST(insert_hint_multiple) {
|
||||
}
|
||||
}
|
||||
|
||||
UNORDERED_AUTO_TEST(insert_hint_unique) {
|
||||
UNORDERED_AUTO_TEST(insert_hint_unique)
|
||||
{
|
||||
typedef boost::unordered_set<int> container;
|
||||
container x;
|
||||
x.insert(x.cbegin(), 10);
|
||||
@@ -98,7 +107,8 @@ UNORDERED_AUTO_TEST(insert_hint_unique) {
|
||||
test::check_equivalent_keys(x);
|
||||
}
|
||||
|
||||
UNORDERED_AUTO_TEST(insert_hint_unique_single) {
|
||||
UNORDERED_AUTO_TEST(insert_hint_unique_single)
|
||||
{
|
||||
typedef boost::unordered_set<int> container;
|
||||
container x;
|
||||
x.insert(10);
|
||||
@@ -114,7 +124,6 @@ UNORDERED_AUTO_TEST(insert_hint_unique_single) {
|
||||
BOOST_TEST_EQ(x.count(20), 1u);
|
||||
test::check_equivalent_keys(x);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
RUN_TESTS()
|
||||
|
||||
Reference in New Issue
Block a user