Files
RobustToolbox/Robust.Shared.Tests/Map/MapBitmask_Tests.cs
T
PJB3005 788e9386fd Split up test project
Robust.UnitTesting was both ALL tests for RT, and also API surface for content tests.

Tests are now split into separate projects as appropriate, and the API side has also been split off.
2025-12-16 01:36:53 +01:00

25 lines
739 B
C#

using NUnit.Framework;
using Robust.Shared.GameObjects;
using Robust.Shared.Maths;
namespace Robust.Shared.Tests.Map;
[TestFixture]
internal sealed class MapBitmask_Tests
{
private static readonly TestCaseData[] Cases = new[]
{
new TestCaseData(Vector2i.Zero, SharedMapSystem.ToBitmask(Vector2i.Zero), true),
new TestCaseData(Vector2i.One * 7, SharedMapSystem.ToBitmask(Vector2i.One * 7), true),
new TestCaseData(Vector2i.One * 7, SharedMapSystem.ToBitmask(Vector2i.Zero), false),
};
[Test, TestCaseSource(nameof(Cases))]
public void TestBitmask(Vector2i index, ulong bitmask, bool result)
{
Assert.That(SharedMapSystem.FromBitmask(index, bitmask), Is.EqualTo(result));
}
}