Skip to content

Commit aa27d9c

Browse files
authored
Fix src/library/cache tests (#167) (#229)
1 parent 9674595 commit aa27d9c

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

src/library/cache/cache.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ class TLRUCache: public TCache<TKey, TValue, TLRUList<TKey, TValue, TSizeProvide
724724
}
725725
};
726726

727-
template <typename TKey, typename TValue, typename TDeleter = TNoopDelete, typename TAllocator = std::allocator<void>, class TSizeProvider = TUniformSizeProvider<TValue>>
727+
template <typename TKey, typename TValue, typename TDeleter = TNoopDelete, class TSizeProvider = TUniformSizeProvider<TValue>, typename TAllocator = std::allocator<typename TLFUList<TKey, TValue, TSizeProvider>::TItem>>
728728
class TLFUCache: public TCache<TKey, TValue, TLFUList<TKey, TValue, TSizeProvider>, TDeleter, TAllocator> {
729729
typedef TCache<TKey, TValue, TLFUList<TKey, TValue, TSizeProvider>, TDeleter, TAllocator> TBase;
730730
using TListType = TLFUList<TKey, TValue, TSizeProvider>;
@@ -749,7 +749,7 @@ class TLFUCache: public TCache<TKey, TValue, TLFUList<TKey, TValue, TSizeProvide
749749
// Least Weighted cache
750750
// discards the least weighted items first
751751
// doesn't support promotion
752-
template <typename TKey, typename TValue, typename TWeight, typename TWeighter, typename TDeleter = TNoopDelete, typename TAllocator = std::allocator<void>>
752+
template <typename TKey, typename TValue, typename TWeight, typename TWeighter, typename TDeleter = TNoopDelete, typename TAllocator = std::allocator<typename TLWList<TKey, TValue, TWeight, TWeighter>::TItem>>
753753
class TLWCache: public TCache<TKey, TValue, TLWList<TKey, TValue, TWeight, TWeighter>, TDeleter, TAllocator> {
754754
typedef TCache<TKey, TValue, TLWList<TKey, TValue, TWeight, TWeighter>, TDeleter, TAllocator> TBase;
755755
using TListType = TLWList<TKey, TValue, TWeight, TWeighter>;

src/library/cache/ut/ya.make

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/library/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
add_subdirectory(cache)
12
add_subdirectory(coroutine)
23
add_subdirectory(login)
34
add_subdirectory(operation_id)

tests/library/cache/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
add_ydb_test(NAME cache-cache_ut
2+
SOURCES
3+
cache_ut.cpp
4+
LINK_LIBRARIES
5+
yutil
6+
cpp-testing-unittest_main
7+
library-cpp-cache
8+
)
File renamed without changes.

0 commit comments

Comments
 (0)