diff --git a/apps/components_tests/detournavigator/asyncnavmeshupdater.cpp b/apps/components_tests/detournavigator/asyncnavmeshupdater.cpp index 4eb56d63e0..14c2a3bfe4 100644 --- a/apps/components_tests/detournavigator/asyncnavmeshupdater.cpp +++ b/apps/components_tests/detournavigator/asyncnavmeshupdater.cpp @@ -266,20 +266,11 @@ namespace updater.post(mAgentBounds, navMeshCacheItem, mPlayerTile, mWorldspace, changedTiles); updater.wait(WaitConditionType::allJobsDone, &mListener); updater.stop(); - const std::set present{ - TilePosition(-1, -1), - TilePosition(-1, 0), - TilePosition(-1, 1), - TilePosition(0, -2), - TilePosition(0, -1), - TilePosition(0, 0), - TilePosition(0, 1), - TilePosition(0, 2), - TilePosition(1, -1), - TilePosition(1, 0), - TilePosition(1, 1), - }; + + std::size_t present = 0; + for (int x = -5; x <= 5; ++x) + { for (int y = -5; y <= 5; ++y) { const TilePosition tilePosition(x, y); @@ -289,15 +280,15 @@ namespace recastMesh->getMeshSources(), [&](const MeshSource& v) { return resolveMeshSource(*dbPtr, v); }); if (std::holds_alternative(objects)) continue; - EXPECT_EQ(dbPtr - ->findTile(mWorldspace, tilePosition, - serialize(mSettings.mRecast, mAgentBounds, *recastMesh, - std::get>(objects))) - .has_value(), - present.find(tilePosition) != present.end()) - << tilePosition.x() << " " << tilePosition.y() - << " present=" << (present.find(tilePosition) != present.end()); + present += dbPtr + ->findTile(mWorldspace, tilePosition, + serialize(mSettings.mRecast, mAgentBounds, *recastMesh, + std::get>(objects))) + .has_value(); } + } + + EXPECT_EQ(present, 11); } TEST_F(DetourNavigatorAsyncNavMeshUpdaterTest, next_tile_id_should_be_updated_on_duplicate)