mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-16 15:22:27 +02:00
23 lines
515 B
C#
23 lines
515 B
C#
using NUnit.Framework;
|
|
using Robust.Shared.Utility;
|
|
|
|
namespace Robust.UnitTesting.Shared.Utility
|
|
{
|
|
[Parallelizable(ParallelScope.All)]
|
|
[TestFixture]
|
|
[TestOf(typeof(MarshalHelper))]
|
|
public sealed class MarshalHelper_Test
|
|
{
|
|
[Test]
|
|
public unsafe void FindNullTerminatorTest()
|
|
{
|
|
var data = stackalloc byte[]
|
|
{
|
|
1, 2, 3, 0
|
|
};
|
|
|
|
Assert.That(MarshalHelper.FindNullTerminator(data), Is.EqualTo(3));
|
|
}
|
|
}
|
|
}
|