\returns true if |key| and its age are contained in |m_keyToAge| and |m_keyToAge|. \note It's a time consumption method and should be called for tests only.
| 152 | /// \returns true if |key| and its age are contained in |m_keyToAge| and |m_keyToAge|. |
| 153 | /// \note It's a time consumption method and should be called for tests only. |
| 154 | bool IsKeyValidForTesting(Key const & key) const |
| 155 | { |
| 156 | auto const keyToAgeId = m_keyToAge.find(key); |
| 157 | if (keyToAgeId == m_keyToAge.cend()) |
| 158 | return false; |
| 159 | auto const ageToKeyIt = m_ageToKey.find(keyToAgeId->second); |
| 160 | if (ageToKeyIt == m_ageToKey.cend()) |
| 161 | return false; |
| 162 | return key == ageToKeyIt->second; |
| 163 | } |
| 164 | |
| 165 | private: |
| 166 | size_t m_age = 0; |
no test coverage detected