Skip to content

Commit

Permalink
better test
Browse files Browse the repository at this point in the history
  • Loading branch information
metalgearsloth committed Aug 31, 2024
1 parent 14ccd7d commit 7100ad2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Robust.UnitTesting/Shared/EntityLookup_Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public sealed class EntityLookupTest
private static readonly TestCaseData[] IntersectingCases = new[]
{
// Big offset
new TestCaseData(true, new MapCoordinates(new Vector2(100f, 0f), MapId), new MapCoordinates(new Vector2(100f, 0f), MapId), 0.25f, true),
new TestCaseData(true, new MapCoordinates(new Vector2(10.5f, 10.5f), MapId), new MapCoordinates(new Vector2(10.5f, 10.5f), MapId), 0.25f, true),
};

private static readonly TestCaseData[] InRangeCases = new[]
Expand Down Expand Up @@ -233,7 +233,7 @@ public void TestGridIntersecting(bool physics, MapCoordinates spawnPos, MapCoord
entManager.Spawn(null, spawnPos);

_ = entManager.SpawnEntity(null, spawnPos);
var bounds = Box2.CenteredAround(queryPos.Position, new Vector2(range, range));
var bounds = new Box2Rotated(Box2.CenteredAround(queryPos.Position, new Vector2(range, range)));

Assert.That(lookup.GetEntitiesIntersecting(queryPos.MapId, bounds).Count > 0, Is.EqualTo(result));
mapManager.DeleteMap(spawnPos.MapId);
Expand Down

0 comments on commit 7100ad2

Please sign in to comment.