mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
4e0f23cdc0
Need to not devolve into Smoochum as the rules are restrictive: no relearn, but we want to allow Jynx to "permit" moves it learns from levels 0-29.
30 lines
1 KiB
C#
30 lines
1 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using FluentAssertions;
|
|
using Xunit;
|
|
|
|
namespace PKHeX.Core.Tests.General;
|
|
|
|
public class MarshalTests
|
|
{
|
|
[Theory]
|
|
[InlineData(8, typeof(PIDIV))]
|
|
[InlineData(8, typeof(MoveResult))]
|
|
[InlineData(8, typeof(EvolutionMethod))]
|
|
[InlineData(8, typeof(Moveset))]
|
|
[InlineData(8, typeof(SCXorShift32))]
|
|
[InlineData(16, typeof(Xoroshiro128Plus))]
|
|
[InlineData(16, typeof(Xoroshiro128Plus8b))]
|
|
[InlineData(16, typeof(XorShift128))]
|
|
public void MarshalSizeExact(int expect, Type t) => Marshal.SizeOf(t).Should().Be(expect);
|
|
|
|
[Theory]
|
|
[InlineData( 8, typeof(NPCLock))]
|
|
[InlineData( 8, typeof(IndividualValueSet))]
|
|
[InlineData( 8, typeof(EvolutionOrigin))]
|
|
[InlineData(16, typeof(DreamWorldEntry))]
|
|
[InlineData(16, typeof(CheckResult))]
|
|
[InlineData(16, typeof(EvolutionLink))]
|
|
[InlineData(24, typeof(GenerateParam9))]
|
|
public void MarshalSizeLessThanEqual(int expect, Type t) => Marshal.SizeOf(t).Should().BeLessOrEqualTo(expect);
|
|
}
|