mirror of
https://github.com/kwsch/PKHeX
synced 2024-12-04 01:39:13 +00:00
92d1666970
Add tests to ensure the optimization remains in effect later
29 lines
675 B
C#
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);
|
|
}
|
|
}
|
|
}
|