aboutsummaryrefslogtreecommitdiffstats
path: root/util/generic/map_ut.cpp
diff options
context:
space:
mode:
authorVlad Yaroslavlev <vladon@vladon.com>2022-02-10 16:46:23 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:23 +0300
commit706b83ed7de5a473436620367af31fc0ceecde07 (patch)
tree103305d30dec77e8f6367753367f59b3cd68f9f1 /util/generic/map_ut.cpp
parent918e8a1574070d0ec733f0b76cfad8f8892ad2e5 (diff)
downloadydb-706b83ed7de5a473436620367af31fc0ceecde07.tar.gz
Restoring authorship annotation for Vlad Yaroslavlev <vladon@vladon.com>. Commit 1 of 2.
Diffstat (limited to 'util/generic/map_ut.cpp')
-rw-r--r--util/generic/map_ut.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/util/generic/map_ut.cpp b/util/generic/map_ut.cpp
index 79e832b024..0987ecf705 100644
--- a/util/generic/map_ut.cpp
+++ b/util/generic/map_ut.cpp
@@ -13,31 +13,31 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
Y_UNIT_TEST(TestMap1) {
{
- TMap<char, int, TLess<char>> m;
+ TMap<char, int, TLess<char>> m;
DoTestMap1(m);
}
{
TMemoryPool p(100);
- TMap<char, int, TLess<char>, TPoolAllocator> m(&p);
+ TMap<char, int, TLess<char>, TPoolAllocator> m(&p);
DoTestMap1(m);
}
}
Y_UNIT_TEST(TestMMap1) {
{
- TMultiMap<char, int, TLess<char>> mm;
+ TMultiMap<char, int, TLess<char>> mm;
DoTestMMap1(mm);
}
{
TMemoryPool p(100);
- TMultiMap<char, int, TLess<char>, TPoolAllocator> mm(&p);
+ TMultiMap<char, int, TLess<char>, TPoolAllocator> mm(&p);
DoTestMMap1(mm);
}
}
template <typename TAlloc>
void DoTestMap1(TMap<char, int, TLess<char>, TAlloc>& m) {
- using maptype = TMap<char, int, TLess<char>, TAlloc>;
+ using maptype = TMap<char, int, TLess<char>, TAlloc>;
// Store mappings between roman numerals and decimals.
m['l'] = 50;
m['x'] = 20; // Deliberate mistake.
@@ -68,7 +68,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
template <typename TAlloc>
void DoTestMMap1(TMultiMap<char, int, TLess<char>, TAlloc>& m) {
- using mmap = TMultiMap<char, int, TLess<char>, TAlloc>;
+ using mmap = TMultiMap<char, int, TLess<char>, TAlloc>;
UNIT_ASSERT(m.count('X') == 0);
@@ -103,7 +103,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
pair_type p5(3, 'x');
pair_type p6(6, 'f');
- using mmap = TMultiMap<int, char, TLess<int>>;
+ using mmap = TMultiMap<int, char, TLess<int>>;
pair_type array[] = {
p1,
@@ -125,7 +125,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
}
Y_UNIT_TEST(TestIterators) {
- using int_map = TMap<int, char, TLess<int>>;
+ using int_map = TMap<int, char, TLess<int>>;
int_map imap;
{
@@ -138,7 +138,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
UNIT_ASSERT(!(cite != ite));
}
- using mmap = TMultiMap<int, char, TLess<int>>;
+ using mmap = TMultiMap<int, char, TLess<int>>;
using pair_type = mmap::value_type;
pair_type p1(3, 'c');
@@ -188,7 +188,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
}
Y_UNIT_TEST(TestEqualRange) {
- using maptype = TMap<char, int, TLess<char>>;
+ using maptype = TMap<char, int, TLess<char>>;
{
maptype m;
@@ -276,7 +276,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
Y_UNIT_TEST(TestTemplateMethods) {
{
- using Container = TMap<TKey, int, TKeyCmp>;
+ using Container = TMap<TKey, int, TKeyCmp>;
using value = Container::value_type;
Container cont;
@@ -304,7 +304,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
}
{
- using Container = TMap<TKey*, int, TKeyCmpPtr>;
+ using Container = TMap<TKey*, int, TKeyCmpPtr>;
using value = Container::value_type;
Container cont;
@@ -333,7 +333,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
}
{
- using Container = TMultiMap<TKey, int, TKeyCmp>;
+ using Container = TMultiMap<TKey, int, TKeyCmp>;
using value = Container::value_type;
Container cont;
@@ -361,7 +361,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
}
{
- using Container = TMultiMap<TKey const volatile*, int, TKeyCmpPtr>;
+ using Container = TMultiMap<TKey const volatile*, int, TKeyCmpPtr>;
using value = Container::value_type;
Container cont;
@@ -399,8 +399,8 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
}
Y_UNIT_TEST(TestEmpty) {
- EmptyAndInsertTest<TMap<char, int, TLess<char>>>(std::pair<char, int>('a', 1));
- EmptyAndInsertTest<TMultiMap<char, int, TLess<char>>>(std::pair<char, int>('a', 1));
+ EmptyAndInsertTest<TMap<char, int, TLess<char>>>(std::pair<char, int>('a', 1));
+ EmptyAndInsertTest<TMultiMap<char, int, TLess<char>>>(std::pair<char, int>('a', 1));
}
struct TParametrizedKeyCmp {
@@ -421,7 +421,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
};
Y_UNIT_TEST(TestMoveComparator) {
- using Container = TMultiMap<TKey, int, TParametrizedKeyCmp>;
+ using Container = TMultiMap<TKey, int, TParametrizedKeyCmp>;
TParametrizedKeyCmp direct(false);
TParametrizedKeyCmp inverse(true);
@@ -434,7 +434,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
c.insert(std::make_pair(TKey(2), 102));
c.insert(std::make_pair(TKey(3), 103));
- TVector<int> values;
+ TVector<int> values;
for (auto& i : c) {
values.push_back(i.second);
}
@@ -447,7 +447,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
}
Y_UNIT_TEST(TestMapInitializerList) {
- TMap<TString, int> m = {
+ TMap<TString, int> m = {
{"one", 1},
{"two", 2},
{"three", 3},
@@ -462,14 +462,14 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
}
Y_UNIT_TEST(TestMMapInitializerList) {
- TMultiMap<TString, int> mm = {
+ TMultiMap<TString, int> mm = {
{"one", 1},
{"two", 2},
{"two", -2},
{"three", 3},
};
UNIT_ASSERT(mm.contains("two"));
- TMultiMap<TString, int> expected;
+ TMultiMap<TString, int> expected;
expected.emplace("one", 1);
expected.emplace("two", 2);
expected.emplace("two", -2);
@@ -478,7 +478,7 @@ Y_UNIT_TEST_SUITE(TYMapTest) {
}
Y_UNIT_TEST(TestMovePoolAlloc) {
- using TMapInPool = TMap<int, int, TLess<int>, TPoolAllocator>;
+ using TMapInPool = TMap<int, int, TLess<int>, TPoolAllocator>;
TMemoryPool pool(1);