diff options
author | lapshov <lapshov@yandex-team.ru> | 2022-02-10 16:49:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:39 +0300 |
commit | 1ef52da9919aaa7ec7e3c51da7fdaa637ab133b7 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/cache/ut | |
parent | 4f36f44b1e216dca1f44ada8d126e7b70f05da2f (diff) | |
download | ydb-1ef52da9919aaa7ec7e3c51da7fdaa637ab133b7.tar.gz |
Restoring authorship annotation for <lapshov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/cache/ut')
-rw-r--r-- | library/cpp/cache/ut/cache_ut.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/library/cpp/cache/ut/cache_ut.cpp b/library/cpp/cache/ut/cache_ut.cpp index 3f54a232a0..329872cfde 100644 --- a/library/cpp/cache/ut/cache_ut.cpp +++ b/library/cpp/cache/ut/cache_ut.cpp @@ -313,17 +313,17 @@ Y_UNIT_TEST_SUITE(TCacheTest) { Y_UNIT_TEST(MultiCacheTest) { typedef TLRUCache<int, TString> TCache; - TCache s(3, true); - UNIT_ASSERT(s.Insert(1, "abcd")); - UNIT_ASSERT(s.Insert(1, "bcde")); - UNIT_ASSERT(s.Insert(2, "fghi")); - UNIT_ASSERT(s.Insert(2, "ghij")); - // (1, "abcd") will be deleted - UNIT_ASSERT(*s.Find(1) == "bcde"); - // (1, "bcde") will be promoted - UNIT_ASSERT(*s.FindOldest() == "fghi"); + TCache s(3, true); + UNIT_ASSERT(s.Insert(1, "abcd")); + UNIT_ASSERT(s.Insert(1, "bcde")); + UNIT_ASSERT(s.Insert(2, "fghi")); + UNIT_ASSERT(s.Insert(2, "ghij")); + // (1, "abcd") will be deleted + UNIT_ASSERT(*s.Find(1) == "bcde"); + // (1, "bcde") will be promoted + UNIT_ASSERT(*s.FindOldest() == "fghi"); } - + struct TMyDelete { static int count; template <typename T> |