diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2018-04-04 04:33:54 +0300 |
---|---|---|
committer | Tatiana Yan <tatiana.kondakova@gmail.com> | 2018-04-05 12:12:34 +0300 |
commit | 98683edb44608033b41d0a1c4b381e7e134a2ffd (patch) | |
tree | b03671124d2ceebd48fba4fc6203cc665c914d9f /base | |
parent | ea9a592f1879d0b8a666c739c7a846548a1ece30 (diff) |
Review fixes.
Diffstat (limited to 'base')
-rw-r--r-- | base/base_tests/fifo_cache_test.cpp | 12 | ||||
-rw-r--r-- | base/fifo_cache.hpp | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/base/base_tests/fifo_cache_test.cpp b/base/base_tests/fifo_cache_test.cpp index b80190ad46..f9fa25e8a6 100644 --- a/base/base_tests/fifo_cache_test.cpp +++ b/base/base_tests/fifo_cache_test.cpp @@ -23,10 +23,10 @@ public: bool IsValid() const { - std::set<Key> listKeys(m_cache.m_list.cbegin(), m_cache.m_list.cend()); - std::set<Key> mapKeys; + set<Key> listKeys(m_cache.m_list.cbegin(), m_cache.m_list.cend()); + set<Key> mapKeys; - for (auto const & kv :m_cache. m_map) + for (auto const & kv : m_cache.m_map) mapKeys.insert(kv.first); return listKeys == mapKeys; @@ -36,7 +36,7 @@ private: FifoCache<Key, Value> m_cache; }; -UNIT_TEST(FifoCacheSmokeTest) +UNIT_TEST(FifoCache_Smoke) { using Key = int; using Value = int; @@ -50,7 +50,7 @@ UNIT_TEST(FifoCacheSmokeTest) TEST(cache.IsValid(), ()); } -UNIT_TEST(FifoCacheTest) +UNIT_TEST(FifoCache) { using Key = int; using Value = int; @@ -77,7 +77,7 @@ UNIT_TEST(FifoCacheTest) } } -UNIT_TEST(FifoCacheLoaderCallsTest) +UNIT_TEST(FifoCache_LoaderCalls) { using Key = int; using Value = int; diff --git a/base/fifo_cache.hpp b/base/fifo_cache.hpp index da4665d57f..0eeb8dc4c4 100644 --- a/base/fifo_cache.hpp +++ b/base/fifo_cache.hpp @@ -34,7 +34,7 @@ public: auto & v = m_map[key]; m_loader(key, v); - return (m_map[key] = v); + return v; } private: |