mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-16 15:22:27 +02:00
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
24 lines
628 B
C#
24 lines
628 B
C#
using NUnit.Framework;
|
|
using Robust.Shared.Maths;
|
|
|
|
namespace Robust.UnitTesting.Shared.Maths
|
|
{
|
|
[TestFixture, Parallelizable, TestOf(typeof(Box2i))]
|
|
sealed class Box2i_Test
|
|
{
|
|
[Test]
|
|
public void Box2iUnion()
|
|
{
|
|
var boxOne = new Box2i(-1, -1, 1, 1);
|
|
var boxTwo = new Box2i(0, 0, 2, 2);
|
|
|
|
var result = boxOne.Union(boxTwo);
|
|
|
|
Assert.That(result.Left, Is.EqualTo(-1));
|
|
Assert.That(result.Bottom, Is.EqualTo(-1));
|
|
Assert.That(result.Right, Is.EqualTo(2));
|
|
Assert.That(result.Top, Is.EqualTo(2));
|
|
}
|
|
}
|
|
}
|