PKHeX/Tests/PKHeX.Core.Tests/General/MarshalTests.cs
Kurt 92d1666970 Make PIDIV a readonly struct
Add tests to ensure the optimization remains in effect later
2021-08-21 18:24:38 -07:00

29 lines
675 B
C#

using System.Runtime.InteropServices;
using FluentAssertions;
using PKHeX.Core;
using Xunit;
namespace PKHeX.Tests.General
{
public class MarshalTests
{
[Fact]
public void MarshalStructure()
{
new DecorationInventory3().ToBytes().Length.Should().Be(DecorationInventory3.SIZE);
}
[Fact]
public void MarshalClass()
{
new Swarm3().ToBytesClass().Length.Should().Be(Swarm3.SIZE);
}
[Fact]
public void MarshalSize()
{
Marshal.SizeOf(typeof(NPCLock)).Should().Be(8);
Marshal.SizeOf(typeof(PIDIV)).Should().Be(8);
}
}
}