mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 08:23:51 +00:00
Merge branch 'navmesh_tiles_cache_tests' into 'master'
Add more checks to NavMeshTilesCache tests See merge request OpenMW/openmw!899
This commit is contained in:
commit
2a6bd1b0cc
1 changed files with 2 additions and 0 deletions
|
@ -60,6 +60,7 @@ namespace
|
||||||
|
|
||||||
EXPECT_FALSE(cache.set(mAgentHalfExtents, mTilePosition, mRecastMesh, mOffMeshConnections,
|
EXPECT_FALSE(cache.set(mAgentHalfExtents, mTilePosition, mRecastMesh, mOffMeshConnections,
|
||||||
std::move(mNavMeshData)));
|
std::move(mNavMeshData)));
|
||||||
|
EXPECT_NE(mNavMeshData.mValue, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(DetourNavigatorNavMeshTilesCacheTest, set_should_return_cached_value)
|
TEST_F(DetourNavigatorNavMeshTilesCacheTest, set_should_return_cached_value)
|
||||||
|
@ -85,6 +86,7 @@ namespace
|
||||||
NavMeshData anotherNavMeshData {anotherData, 1};
|
NavMeshData anotherNavMeshData {anotherData, 1};
|
||||||
|
|
||||||
cache.set(mAgentHalfExtents, mTilePosition, mRecastMesh, mOffMeshConnections, std::move(mNavMeshData));
|
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));
|
const auto result = cache.set(mAgentHalfExtents, mTilePosition, mRecastMesh, mOffMeshConnections, std::move(anotherNavMeshData));
|
||||||
ASSERT_TRUE(result);
|
ASSERT_TRUE(result);
|
||||||
EXPECT_EQ(result.get(), (NavMeshDataRef {mData, 1}));
|
EXPECT_EQ(result.get(), (NavMeshDataRef {mData, 1}));
|
||||||
|
|
Loading…
Reference in a new issue