mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-03 02:27:08 +02:00
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.
25 lines
739 B
C#
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));
|
|
}
|
|
}
|