using System.Numerics; using AcDream.Core.Physics; using Xunit; namespace AcDream.Core.Tests.Physics; public class CellTransitFindCellListTests { [Fact] public void IndoorSeed_NoCacheEntry_ReturnsFallback() { var cache = new PhysicsDataCache(); // Indoor seed but cell not cached → FindCellList early-returns the fallback. uint result = CellTransit.FindCellList( cache, worldSphereCenter: Vector3.Zero, sphereRadius: 0.5f, currentCellId: 0xA9B40100u); Assert.Equal(0xA9B40100u, result); } [Fact] public void OutdoorSeed_Returns_FallbackWhenNoCellBSPs() { var cache = new PhysicsDataCache(); // Outdoor seed: AddAllOutsideCells adds landcell candidates, but they // have no CellPhysics (only EnvCells get cached) → containment loop // finds no winner → fall back. uint result = CellTransit.FindCellList( cache, worldSphereCenter: new Vector3(12f, 12f, 0f), sphereRadius: 0.5f, currentCellId: 0xA9B40001u); Assert.Equal(0xA9B40001u, result); } }