diff options
author | yuraaka <yuraaka@yandex-team.ru> | 2022-02-10 16:47:05 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:05 +0300 |
commit | 4230543261d7a38ef4dc14785ae0d45f2da43704 (patch) | |
tree | 7d5099e41a66d7501887488432100e3cfc69ea72 /library/cpp/containers/flat_hash/ut | |
parent | 8cac63f90980b825f78cbd01f45b396297047c2c (diff) | |
download | ydb-4230543261d7a38ef4dc14785ae0d45f2da43704.tar.gz |
Restoring authorship annotation for <yuraaka@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/containers/flat_hash/ut')
-rw-r--r-- | library/cpp/containers/flat_hash/ut/flat_hash_ut.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/library/cpp/containers/flat_hash/ut/flat_hash_ut.cpp b/library/cpp/containers/flat_hash/ut/flat_hash_ut.cpp index 2b9d6a1dc2..76004649c0 100644 --- a/library/cpp/containers/flat_hash/ut/flat_hash_ut.cpp +++ b/library/cpp/containers/flat_hash/ut/flat_hash_ut.cpp @@ -20,8 +20,8 @@ const std::initializer_list<std::pair<const int, TString>> MAP_INPUT_SAMPLE{ template <class Map> class TMapTest : public TTestBase { - void AllocatorTest(); - + void AllocatorTest(); + void SmokingTest() { Map mp; mp.emplace(5, "abc"); @@ -123,7 +123,7 @@ class TMapTest : public TTestBase { } UNIT_TEST_SUITE_DEMANGLE(TMapTest); - UNIT_TEST(AllocatorTest); + UNIT_TEST(AllocatorTest); UNIT_TEST(SmokingTest); UNIT_TEST(CopyConstructionTest); UNIT_TEST(MoveConstructionTest); @@ -135,18 +135,18 @@ class TMapTest : public TTestBase { UNIT_TEST_SUITE_END(); }; -template <> -void TMapTest<TFlatHashMap<int, TString>>::AllocatorTest() { - using Map = TFlatHashMap<int, TString>; - Map mp(3, typename Map::allocator_type()); -} - -template <> -void TMapTest<TDenseHashMapStaticMarker<int, TString, -1>>::AllocatorTest() { - using Map = TDenseHashMapStaticMarker<int, TString, -1>; - Map mp(3, NFlatHash::NMap::TStaticValueMarker<-1, TString>(), typename Map::allocator_type()); -} - +template <> +void TMapTest<TFlatHashMap<int, TString>>::AllocatorTest() { + using Map = TFlatHashMap<int, TString>; + Map mp(3, typename Map::allocator_type()); +} + +template <> +void TMapTest<TDenseHashMapStaticMarker<int, TString, -1>>::AllocatorTest() { + using Map = TDenseHashMapStaticMarker<int, TString, -1>; + Map mp(3, NFlatHash::NMap::TStaticValueMarker<-1, TString>(), typename Map::allocator_type()); +} + using TFlatHashMapTest = TMapTest<TFlatHashMap<int, TString>>; using TDenseHashMapTest = TMapTest<TDenseHashMapStaticMarker<int, TString, -1>>; @@ -156,7 +156,7 @@ UNIT_TEST_SUITE_REGISTRATION(TDenseHashMapTest); template <class Set> class TSetTest : public TTestBase { - void AllocatorTest(); + void AllocatorTest(); void DefaultConstructTest() { Set st; @@ -241,7 +241,7 @@ class TSetTest : public TTestBase { } UNIT_TEST_SUITE_DEMANGLE(TSetTest); - UNIT_TEST(AllocatorTest); + UNIT_TEST(AllocatorTest); UNIT_TEST(DefaultConstructTest); UNIT_TEST(InitCapacityConstructTest); UNIT_TEST(IteratorsConstructTest); @@ -253,19 +253,19 @@ class TSetTest : public TTestBase { UNIT_TEST_SUITE_END(); }; -template <> -void TSetTest<TFlatHashSet<int>>::AllocatorTest() { - using Map = TFlatHashSet<int>; - Map mp(3, typename Map::allocator_type()); -} - -template <> -void TSetTest<TDenseHashSetStaticMarker<int, -1>>::AllocatorTest() { - using Map = TDenseHashSetStaticMarker<int, -1>; - Map mp(3, NFlatHash::NSet::TStaticValueMarker<-1>(), typename Map::allocator_type()); -} - -using TFlatHashSetTest = TSetTest<TFlatHashSet<int, THash<int>>>; +template <> +void TSetTest<TFlatHashSet<int>>::AllocatorTest() { + using Map = TFlatHashSet<int>; + Map mp(3, typename Map::allocator_type()); +} + +template <> +void TSetTest<TDenseHashSetStaticMarker<int, -1>>::AllocatorTest() { + using Map = TDenseHashSetStaticMarker<int, -1>; + Map mp(3, NFlatHash::NSet::TStaticValueMarker<-1>(), typename Map::allocator_type()); +} + +using TFlatHashSetTest = TSetTest<TFlatHashSet<int, THash<int>>>; using TDenseHashSetTest = TSetTest<TDenseHashSetStaticMarker<int, -1>>; UNIT_TEST_SUITE_REGISTRATION(TFlatHashSetTest); |