From 105cd5b06fe92160b4e59e63f8e88c59adf016b2 Mon Sep 17 00:00:00 2001 From: elsid Date: Fri, 21 May 2021 19:30:29 +0200 Subject: [PATCH] Add more checks to NavMeshTilesCache tests --- apps/openmw_test_suite/detournavigator/navmeshtilescache.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/openmw_test_suite/detournavigator/navmeshtilescache.cpp b/apps/openmw_test_suite/detournavigator/navmeshtilescache.cpp index a16c3af1d..447a5b44e 100644 --- a/apps/openmw_test_suite/detournavigator/navmeshtilescache.cpp +++ b/apps/openmw_test_suite/detournavigator/navmeshtilescache.cpp @@ -60,6 +60,7 @@ namespace EXPECT_FALSE(cache.set(mAgentHalfExtents, mTilePosition, mRecastMesh, mOffMeshConnections, std::move(mNavMeshData))); + EXPECT_NE(mNavMeshData.mValue, nullptr); } TEST_F(DetourNavigatorNavMeshTilesCacheTest, set_should_return_cached_value) @@ -85,6 +86,7 @@ namespace NavMeshData anotherNavMeshData {anotherData, 1}; cache.set(mAgentHalfExtents, mTilePosition, mRecastMesh, mOffMeshConnections, std::move(mNavMeshData)); + EXPECT_EQ(mNavMeshData.mValue, nullptr); const auto result = cache.set(mAgentHalfExtents, mTilePosition, mRecastMesh, mOffMeshConnections, std::move(anotherNavMeshData)); ASSERT_TRUE(result); EXPECT_EQ(result.get(), (NavMeshDataRef {mData, 1}));