From 2382717600939e0e970f47f404cd62672c097ad4 Mon Sep 17 00:00:00 2001 From: Mary Date: Fri, 24 Jun 2022 21:11:56 +0200 Subject: timezone: Fix regression caused by #3361 (#3418) Because of that PR, TimeZoneRule was bigger than 0x4000 thanks to a misuse of a constant. This commit address this issue and add a new unit test to ensure the size of TimeZoneRule is 0x4000 bytes. Also address suggestions that were lost on the original PR. --- Ryujinx.Tests/Time/TimeZoneRuleTests.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Ryujinx.Tests/Time/TimeZoneRuleTests.cs (limited to 'Ryujinx.Tests/Time') diff --git a/Ryujinx.Tests/Time/TimeZoneRuleTests.cs b/Ryujinx.Tests/Time/TimeZoneRuleTests.cs new file mode 100644 index 00000000..4d5c4eaa --- /dev/null +++ b/Ryujinx.Tests/Time/TimeZoneRuleTests.cs @@ -0,0 +1,18 @@ +using NUnit.Framework; +using Ryujinx.HLE.HOS.Services.Time.TimeZone; +using System.Runtime.CompilerServices; + +namespace Ryujinx.Tests.Time +{ + internal class TimeZoneRuleTests + { + class EffectInfoParameterTests + { + [Test] + public void EnsureTypeSize() + { + Assert.AreEqual(0x4000, Unsafe.SizeOf()); + } + } + } +} -- cgit v1.2.3