Update NUnit to 4.4.0

* NUnit3TestAdapter to 5.2.0

* Rename Assert class to ClassicAssert to align with NUnit 4.x changes
This commit is contained in:
KeatonTheBot committed 2025-10-19 23:01:06 -05:00
1 parent 1724149443
commit 280461dc78
54 files changed
+629 -576

No files matched your search

@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x34, Unsafe.SizeOf<AudioRendererConfiguration>());
ClassicAssert.AreEqual(0x34, Unsafe.SizeOf<AudioRendererConfiguration>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Common;
using System.Runtime.CompilerServices;
@@ -9,8 +10,8 @@ namespace Ryujinx.Tests.Audio.Renderer
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x10, Unsafe.SizeOf<BehaviourParameter>());
Assert.AreEqual(0x10, Unsafe.SizeOf<BehaviourParameter.ErrorInfo>());
ClassicAssert.AreEqual(0x10, Unsafe.SizeOf<BehaviourParameter>());
ClassicAssert.AreEqual(0x10, Unsafe.SizeOf<BehaviourParameter.ErrorInfo>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices;
@@ -9,8 +10,8 @@ namespace Ryujinx.Tests.Audio.Renderer
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0xC, Unsafe.SizeOf<BiquadFilterParameter1>());
Assert.AreEqual(0x18, Unsafe.SizeOf<BiquadFilterParameter2>());
ClassicAssert.AreEqual(0xC, Unsafe.SizeOf<BiquadFilterParameter1>());
ClassicAssert.AreEqual(0x18, Unsafe.SizeOf<BiquadFilterParameter2>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Common;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Common
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x40, Unsafe.SizeOf<UpdateDataHeader>());
ClassicAssert.AreEqual(0x40, Unsafe.SizeOf<UpdateDataHeader>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Common;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Common
[Test]
public void EnsureTypeSize()
{
Assert.LessOrEqual(Unsafe.SizeOf<VoiceState>(), 0x100);
ClassicAssert.LessOrEqual(Unsafe.SizeOf<VoiceState>(), 0x100);
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Common;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Common
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x30, Unsafe.SizeOf<WaveBuffer>());
ClassicAssert.AreEqual(0x30, Unsafe.SizeOf<WaveBuffer>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Dsp;
using Ryujinx.Audio.Renderer.Parameter;
using System;
@@ -74,13 +75,13 @@ namespace Ryujinx.Tests.Audio.Renderer.Dsp
float thisDelta = Math.Abs(expectedOutput[sample] - outputBuffer[sample]);
// Ensure no discontinuities
Assert.IsTrue(thisDelta < 0.1f);
ClassicAssert.IsTrue(thisDelta < 0.1f);
sumDifference += thisDelta;
}
sumDifference /= outputSampleCount;
// Expect the output to be 99% similar to the expected resampled sine wave
Assert.IsTrue(sumDifference < 0.01f);
ClassicAssert.IsTrue(sumDifference < 0.01f);
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Dsp;
using Ryujinx.Audio.Renderer.Server.Upsampler;
using System;
@@ -51,7 +52,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Dsp
sumDifference /= expectedOutput.Length;
// Expect the output to be 98% similar to the expected resampled sine wave
Assert.IsTrue(sumDifference < 0.02f);
ClassicAssert.IsTrue(sumDifference < 0.02f);
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices;
@@ -9,8 +10,8 @@ namespace Ryujinx.Tests.Audio.Renderer
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0xC0, Unsafe.SizeOf<EffectInParameterVersion1>());
Assert.AreEqual(0xC0, Unsafe.SizeOf<EffectInParameterVersion2>());
ClassicAssert.AreEqual(0xC0, Unsafe.SizeOf<EffectInParameterVersion1>());
ClassicAssert.AreEqual(0xC0, Unsafe.SizeOf<EffectInParameterVersion2>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices;
@@ -9,8 +10,8 @@ namespace Ryujinx.Tests.Audio.Renderer
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x10, Unsafe.SizeOf<EffectOutStatusVersion1>());
Assert.AreEqual(0x90, Unsafe.SizeOf<EffectOutStatusVersion2>());
ClassicAssert.AreEqual(0x10, Unsafe.SizeOf<EffectOutStatusVersion1>());
ClassicAssert.AreEqual(0x90, Unsafe.SizeOf<EffectOutStatusVersion2>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices;
@@ -9,8 +10,8 @@ namespace Ryujinx.Tests.Audio.Renderer
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x20, Unsafe.SizeOf<MemoryPoolInParameter>());
Assert.AreEqual(0x10, Unsafe.SizeOf<MemoryPoolOutStatus>());
ClassicAssert.AreEqual(0x20, Unsafe.SizeOf<MemoryPoolInParameter>());
ClassicAssert.AreEqual(0x10, Unsafe.SizeOf<MemoryPoolOutStatus>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0xB0, Unsafe.SizeOf<BehaviourErrorInfoOutStatus>());
ClassicAssert.AreEqual(0xB0, Unsafe.SizeOf<BehaviourErrorInfoOutStatus>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Effect;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x6C, Unsafe.SizeOf<AuxiliaryBufferParameter>());
ClassicAssert.AreEqual(0x6C, Unsafe.SizeOf<AuxiliaryBufferParameter>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Effect;
using System.Runtime.CompilerServices;
@@ -9,8 +10,8 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x18, Unsafe.SizeOf<BiquadFilterEffectParameter1>());
Assert.AreEqual(0x24, Unsafe.SizeOf<BiquadFilterEffectParameter2>());
ClassicAssert.AreEqual(0x18, Unsafe.SizeOf<BiquadFilterEffectParameter1>());
ClassicAssert.AreEqual(0x24, Unsafe.SizeOf<BiquadFilterEffectParameter2>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Effect;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x94, Unsafe.SizeOf<BufferMixParameter>());
ClassicAssert.AreEqual(0x94, Unsafe.SizeOf<BufferMixParameter>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Effect;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x38, Unsafe.SizeOf<CompressorParameter>());
ClassicAssert.AreEqual(0x38, Unsafe.SizeOf<CompressorParameter>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Effect;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x35, Unsafe.SizeOf<DelayParameter>());
ClassicAssert.AreEqual(0x35, Unsafe.SizeOf<DelayParameter>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Effect;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x44, Unsafe.SizeOf<LimiterParameter>());
ClassicAssert.AreEqual(0x44, Unsafe.SizeOf<LimiterParameter>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Effect;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x30, Unsafe.SizeOf<LimiterStatistics>());
ClassicAssert.AreEqual(0x30, Unsafe.SizeOf<LimiterStatistics>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Effect;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x49, Unsafe.SizeOf<Reverb3dParameter>());
ClassicAssert.AreEqual(0x49, Unsafe.SizeOf<Reverb3dParameter>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Effect;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x41, Unsafe.SizeOf<ReverbParameter>());
ClassicAssert.AreEqual(0x41, Unsafe.SizeOf<ReverbParameter>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x20, Unsafe.SizeOf<MixInParameterDirtyOnlyUpdate>());
ClassicAssert.AreEqual(0x20, Unsafe.SizeOf<MixInParameterDirtyOnlyUpdate>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x930, Unsafe.SizeOf<MixParameter>());
ClassicAssert.AreEqual(0x930, Unsafe.SizeOf<MixParameter>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Performance;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x10, Unsafe.SizeOf<PerformanceInParameter>());
ClassicAssert.AreEqual(0x10, Unsafe.SizeOf<PerformanceInParameter>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Performance;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x10, Unsafe.SizeOf<PerformanceOutStatus>());
ClassicAssert.AreEqual(0x10, Unsafe.SizeOf<PerformanceOutStatus>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x10, Unsafe.SizeOf<RendererInfoOutStatus>());
ClassicAssert.AreEqual(0x10, Unsafe.SizeOf<RendererInfoOutStatus>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Sink;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Sink
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x24, Unsafe.SizeOf<CircularBufferParameter>());
ClassicAssert.AreEqual(0x24, Unsafe.SizeOf<CircularBufferParameter>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Sink;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Sink
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x11C, Unsafe.SizeOf<DeviceParameter>());
ClassicAssert.AreEqual(0x11C, Unsafe.SizeOf<DeviceParameter>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x140, Unsafe.SizeOf<SinkInParameter>());
ClassicAssert.AreEqual(0x140, Unsafe.SizeOf<SinkInParameter>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x20, Unsafe.SizeOf<SinkOutStatus>());
ClassicAssert.AreEqual(0x20, Unsafe.SizeOf<SinkOutStatus>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x20, Unsafe.SizeOf<SplitterInParameterHeader>());
ClassicAssert.AreEqual(0x20, Unsafe.SizeOf<SplitterInParameterHeader>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Server.MemoryPool;
using System;
using System.Runtime.CompilerServices;
@@ -10,7 +11,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x20, Unsafe.SizeOf<AddressInfo>());
ClassicAssert.AreEqual(0x20, Unsafe.SizeOf<AddressInfo>());
}
[Test]
@@ -25,11 +26,11 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
addressInfo.ForceMappedDspAddress = 0x2000000;
Assert.AreEqual(0x2000000, addressInfo.GetReference(true));
ClassicAssert.AreEqual(0x2000000, addressInfo.GetReference(true));
addressInfo.SetupMemoryPool(memoryPoolState.AsSpan());
Assert.AreEqual(0x4000000, addressInfo.GetReference(true));
ClassicAssert.AreEqual(0x4000000, addressInfo.GetReference(true));
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Server;
namespace Ryujinx.Tests.Audio.Renderer.Server
@@ -12,11 +13,11 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
int previousRevision = BehaviourInfo.BaseRevisionMagic + (BehaviourInfo.LastRevision - 1);
int invalidRevision = BehaviourInfo.BaseRevisionMagic + (BehaviourInfo.LastRevision + 1);
Assert.IsTrue(BehaviourInfo.CheckFeatureSupported(latestRevision, latestRevision));
Assert.IsFalse(BehaviourInfo.CheckFeatureSupported(previousRevision, latestRevision));
Assert.IsTrue(BehaviourInfo.CheckFeatureSupported(latestRevision, previousRevision));
ClassicAssert.IsTrue(BehaviourInfo.CheckFeatureSupported(latestRevision, latestRevision));
ClassicAssert.IsFalse(BehaviourInfo.CheckFeatureSupported(previousRevision, latestRevision));
ClassicAssert.IsTrue(BehaviourInfo.CheckFeatureSupported(latestRevision, previousRevision));
// In case we get an invalid revision, this is supposed to auto default to REV1 internally.. idk what the hell Nintendo was thinking here..
Assert.IsTrue(BehaviourInfo.CheckFeatureSupported(invalidRevision, latestRevision));
ClassicAssert.IsTrue(BehaviourInfo.CheckFeatureSupported(invalidRevision, latestRevision));
}
[Test]
@@ -26,11 +27,11 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision1);
Assert.IsFalse(behaviourInfo.IsMemoryPoolForceMappingEnabled());
ClassicAssert.IsFalse(behaviourInfo.IsMemoryPoolForceMappingEnabled());
behaviourInfo.UpdateFlags(0x1);
Assert.IsTrue(behaviourInfo.IsMemoryPoolForceMappingEnabled());
ClassicAssert.IsTrue(behaviourInfo.IsMemoryPoolForceMappingEnabled());
}
[Test]
@@ -40,26 +41,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision1);
Assert.IsFalse(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsFalse(behaviourInfo.IsSplitterSupported());
Assert.IsFalse(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsFalse(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsFalse(behaviourInfo.IsSplitterBugFixed());
Assert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
ClassicAssert.IsFalse(behaviourInfo.IsAdpcmLoopContextBugFixed());
ClassicAssert.IsFalse(behaviourInfo.IsSplitterSupported());
ClassicAssert.IsFalse(behaviourInfo.IsLongSizePreDelaySupported());
ClassicAssert.IsFalse(behaviourInfo.IsAudioUsbDeviceOutputSupported());
ClassicAssert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
ClassicAssert.IsFalse(behaviourInfo.IsSplitterBugFixed());
ClassicAssert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported());
ClassicAssert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported());
ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
ClassicAssert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
ClassicAssert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
ClassicAssert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
ClassicAssert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.70f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat());
ClassicAssert.AreEqual(0.70f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
ClassicAssert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
ClassicAssert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat());
}
[Test]
@@ -69,26 +70,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision2);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsFalse(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsFalse(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsFalse(behaviourInfo.IsSplitterBugFixed());
Assert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
ClassicAssert.IsFalse(behaviourInfo.IsLongSizePreDelaySupported());
ClassicAssert.IsFalse(behaviourInfo.IsAudioUsbDeviceOutputSupported());
ClassicAssert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
ClassicAssert.IsFalse(behaviourInfo.IsSplitterBugFixed());
ClassicAssert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported());
ClassicAssert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported());
ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
ClassicAssert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
ClassicAssert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
ClassicAssert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
ClassicAssert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.70f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat());
ClassicAssert.AreEqual(0.70f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
ClassicAssert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
ClassicAssert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat());
}
[Test]
@@ -98,26 +99,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision3);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsFalse(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsFalse(behaviourInfo.IsSplitterBugFixed());
Assert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
ClassicAssert.IsFalse(behaviourInfo.IsAudioUsbDeviceOutputSupported());
ClassicAssert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
ClassicAssert.IsFalse(behaviourInfo.IsSplitterBugFixed());
ClassicAssert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported());
ClassicAssert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported());
ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
ClassicAssert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
ClassicAssert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
ClassicAssert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
ClassicAssert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.70f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat());
ClassicAssert.AreEqual(0.70f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
ClassicAssert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
ClassicAssert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat());
}
[Test]
@@ -127,26 +128,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision4);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsFalse(behaviourInfo.IsSplitterBugFixed());
Assert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
ClassicAssert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
ClassicAssert.IsFalse(behaviourInfo.IsSplitterBugFixed());
ClassicAssert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported());
ClassicAssert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported());
ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
ClassicAssert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
ClassicAssert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
ClassicAssert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
ClassicAssert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.75f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat());
ClassicAssert.AreEqual(0.75f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
ClassicAssert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
ClassicAssert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat());
}
[Test]
@@ -156,26 +157,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision5);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed());
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
ClassicAssert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
ClassicAssert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
ClassicAssert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
ClassicAssert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
ClassicAssert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
ClassicAssert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(2, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
ClassicAssert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
ClassicAssert.AreEqual(2, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
ClassicAssert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
}
[Test]
@@ -185,26 +186,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision6);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed());
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
ClassicAssert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
ClassicAssert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
ClassicAssert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
ClassicAssert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
ClassicAssert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
ClassicAssert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(2, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
ClassicAssert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
ClassicAssert.AreEqual(2, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
ClassicAssert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
}
[Test]
@@ -214,26 +215,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision7);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed());
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
ClassicAssert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
ClassicAssert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
ClassicAssert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
ClassicAssert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
ClassicAssert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(2, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
ClassicAssert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
ClassicAssert.AreEqual(2, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
ClassicAssert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
}
[Test]
@@ -243,26 +244,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision8);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed());
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
ClassicAssert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
ClassicAssert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
ClassicAssert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
ClassicAssert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
ClassicAssert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(3, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
ClassicAssert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
ClassicAssert.AreEqual(3, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
ClassicAssert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
}
[Test]
@@ -272,26 +273,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision9);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed());
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
ClassicAssert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
ClassicAssert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
ClassicAssert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
ClassicAssert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
ClassicAssert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(3, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
ClassicAssert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
ClassicAssert.AreEqual(3, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
ClassicAssert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
}
[Test]
@@ -301,26 +302,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision10);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed());
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
ClassicAssert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
ClassicAssert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
ClassicAssert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
ClassicAssert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
ClassicAssert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing());
ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(4, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
ClassicAssert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
ClassicAssert.AreEqual(4, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
ClassicAssert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
}
[Test]
@@ -330,26 +331,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision11);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed());
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsTrue(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
ClassicAssert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
ClassicAssert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
ClassicAssert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
ClassicAssert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
ClassicAssert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing());
ClassicAssert.IsTrue(behaviourInfo.IsNewEffectChannelMappingSupported());
ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(5, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
ClassicAssert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
ClassicAssert.AreEqual(5, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
ClassicAssert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
}
[Test]
@@ -359,26 +360,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision12);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed());
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsTrue(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
ClassicAssert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
ClassicAssert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
ClassicAssert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
ClassicAssert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
ClassicAssert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing());
ClassicAssert.IsTrue(behaviourInfo.IsNewEffectChannelMappingSupported());
ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(5, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
ClassicAssert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
ClassicAssert.AreEqual(5, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
ClassicAssert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
}
[Test]
@@ -388,26 +389,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision13);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed());
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsTrue(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsTrue(behaviourInfo.IsSplitterPrevVolumeResetSupported());
ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
ClassicAssert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
ClassicAssert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
ClassicAssert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
ClassicAssert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
ClassicAssert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
ClassicAssert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing());
ClassicAssert.IsTrue(behaviourInfo.IsNewEffectChannelMappingSupported());
ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
ClassicAssert.IsTrue(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(5, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
ClassicAssert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
ClassicAssert.AreEqual(5, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
ClassicAssert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Server.MemoryPool;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(Unsafe.SizeOf<MemoryPoolInfo>(), 0x20);
ClassicAssert.AreEqual(Unsafe.SizeOf<MemoryPoolInfo>(), 0x20);
}
[Test]
@@ -21,12 +22,12 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
memoryPool.DspAddress = 0x2000000;
Assert.IsTrue(memoryPool.Contains(0x1000000, 0x10));
Assert.IsTrue(memoryPool.Contains(0x1000FE0, 0x10));
Assert.IsTrue(memoryPool.Contains(0x1000FFF, 0x1));
Assert.IsFalse(memoryPool.Contains(0x1000FFF, 0x2));
Assert.IsFalse(memoryPool.Contains(0x1001000, 0x10));
Assert.IsFalse(memoryPool.Contains(0x2000000, 0x10));
ClassicAssert.IsTrue(memoryPool.Contains(0x1000000, 0x10));
ClassicAssert.IsTrue(memoryPool.Contains(0x1000FE0, 0x10));
ClassicAssert.IsTrue(memoryPool.Contains(0x1000FFF, 0x1));
ClassicAssert.IsFalse(memoryPool.Contains(0x1000FFF, 0x2));
ClassicAssert.IsFalse(memoryPool.Contains(0x1001000, 0x10));
ClassicAssert.IsFalse(memoryPool.Contains(0x2000000, 0x10));
}
[Test]
@@ -38,11 +39,11 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
memoryPool.DspAddress = 0x2000000;
Assert.AreEqual(0x2000FE0, memoryPool.Translate(0x1000FE0, 0x10));
Assert.AreEqual(0x2000FFF, memoryPool.Translate(0x1000FFF, 0x1));
Assert.AreEqual(0x0, memoryPool.Translate(0x1000FFF, 0x2));
Assert.AreEqual(0x0, memoryPool.Translate(0x1001000, 0x10));
Assert.AreEqual(0x0, memoryPool.Translate(0x2000000, 0x10));
ClassicAssert.AreEqual(0x2000FE0, memoryPool.Translate(0x1000FE0, 0x10));
ClassicAssert.AreEqual(0x2000FFF, memoryPool.Translate(0x1000FFF, 0x1));
ClassicAssert.AreEqual(0x0, memoryPool.Translate(0x1000FFF, 0x2));
ClassicAssert.AreEqual(0x0, memoryPool.Translate(0x1001000, 0x10));
ClassicAssert.AreEqual(0x0, memoryPool.Translate(0x2000000, 0x10));
}
[Test]
@@ -52,11 +53,11 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
memoryPool.SetCpuAddress(0x1000000, 0x1000);
Assert.IsFalse(memoryPool.IsMapped());
ClassicAssert.IsFalse(memoryPool.IsMapped());
memoryPool.DspAddress = 0x2000000;
Assert.IsTrue(memoryPool.IsMapped());
ClassicAssert.IsTrue(memoryPool.IsMapped());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Server.Mix;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x940, Unsafe.SizeOf<MixInfo>());
ClassicAssert.AreEqual(0x940, Unsafe.SizeOf<MixInfo>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio;
using Ryujinx.Audio.Renderer.Server.MemoryPool;
using System;
@@ -23,12 +24,12 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
const DspAddress DspAddress = CpuAddress; // TODO: DSP LLE
const ulong CpuSize = 0x1000;
Assert.IsFalse(poolMapper.InitializeSystemPool(ref memoryPoolCpu, CpuAddress, CpuSize));
Assert.IsTrue(poolMapper.InitializeSystemPool(ref memoryPoolDsp, CpuAddress, CpuSize));
ClassicAssert.IsFalse(poolMapper.InitializeSystemPool(ref memoryPoolCpu, CpuAddress, CpuSize));
ClassicAssert.IsTrue(poolMapper.InitializeSystemPool(ref memoryPoolDsp, CpuAddress, CpuSize));
Assert.AreEqual(CpuAddress, memoryPoolDsp.CpuAddress);
Assert.AreEqual(CpuSize, memoryPoolDsp.Size);
Assert.AreEqual(DspAddress, memoryPoolDsp.DspAddress);
ClassicAssert.AreEqual(CpuAddress, memoryPoolDsp.CpuAddress);
ClassicAssert.AreEqual(CpuSize, memoryPoolDsp.Size);
ClassicAssert.AreEqual(DspAddress, memoryPoolDsp.DspAddress);
}
[Test]
@@ -38,8 +39,8 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
MemoryPoolInfo memoryPoolDsp = MemoryPoolInfo.Create(MemoryPoolInfo.LocationType.Dsp);
MemoryPoolInfo memoryPoolCpu = MemoryPoolInfo.Create(MemoryPoolInfo.LocationType.Cpu);
Assert.AreEqual(0xFFFF8001, poolMapper.GetProcessHandle(ref memoryPoolCpu));
Assert.AreEqual(DummyProcessHandle, poolMapper.GetProcessHandle(ref memoryPoolDsp));
ClassicAssert.AreEqual(0xFFFF8001, poolMapper.GetProcessHandle(ref memoryPoolCpu));
ClassicAssert.AreEqual(DummyProcessHandle, poolMapper.GetProcessHandle(ref memoryPoolDsp));
}
[Test]
@@ -56,15 +57,15 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
memoryPoolDsp.SetCpuAddress(CpuAddress, CpuSize);
memoryPoolCpu.SetCpuAddress(CpuAddress, CpuSize);
Assert.AreEqual(DspAddress, poolMapper.Map(ref memoryPoolCpu));
Assert.AreEqual(DspAddress, poolMapper.Map(ref memoryPoolDsp));
Assert.AreEqual(DspAddress, memoryPoolDsp.DspAddress);
Assert.IsTrue(poolMapper.Unmap(ref memoryPoolCpu));
ClassicAssert.AreEqual(DspAddress, poolMapper.Map(ref memoryPoolCpu));
ClassicAssert.AreEqual(DspAddress, poolMapper.Map(ref memoryPoolDsp));
ClassicAssert.AreEqual(DspAddress, memoryPoolDsp.DspAddress);
ClassicAssert.IsTrue(poolMapper.Unmap(ref memoryPoolCpu));
memoryPoolDsp.IsUsed = true;
Assert.IsFalse(poolMapper.Unmap(ref memoryPoolDsp));
ClassicAssert.IsFalse(poolMapper.Unmap(ref memoryPoolDsp));
memoryPoolDsp.IsUsed = false;
Assert.IsTrue(poolMapper.Unmap(ref memoryPoolDsp));
ClassicAssert.IsTrue(poolMapper.Unmap(ref memoryPoolDsp));
}
[Test]
@@ -90,45 +91,45 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
PoolMapper poolMapper = new(DummyProcessHandle, true);
Assert.IsTrue(poolMapper.TryAttachBuffer(out ErrorInfo errorInfo, ref addressInfo, 0, 0));
ClassicAssert.IsTrue(poolMapper.TryAttachBuffer(out ErrorInfo errorInfo, ref addressInfo, 0, 0));
Assert.AreEqual(ResultCode.InvalidAddressInfo, errorInfo.ErrorCode);
Assert.AreEqual(0, errorInfo.ExtraErrorInfo);
Assert.AreEqual(0, addressInfo.ForceMappedDspAddress);
ClassicAssert.AreEqual(ResultCode.InvalidAddressInfo, errorInfo.ErrorCode);
ClassicAssert.AreEqual(0, errorInfo.ExtraErrorInfo);
ClassicAssert.AreEqual(0, addressInfo.ForceMappedDspAddress);
Assert.IsTrue(poolMapper.TryAttachBuffer(out errorInfo, ref addressInfo, CpuAddress, CpuSize));
ClassicAssert.IsTrue(poolMapper.TryAttachBuffer(out errorInfo, ref addressInfo, CpuAddress, CpuSize));
Assert.AreEqual(ResultCode.InvalidAddressInfo, errorInfo.ErrorCode);
Assert.AreEqual(CpuAddress, errorInfo.ExtraErrorInfo);
Assert.AreEqual(DspAddress, addressInfo.ForceMappedDspAddress);
ClassicAssert.AreEqual(ResultCode.InvalidAddressInfo, errorInfo.ErrorCode);
ClassicAssert.AreEqual(CpuAddress, errorInfo.ExtraErrorInfo);
ClassicAssert.AreEqual(DspAddress, addressInfo.ForceMappedDspAddress);
poolMapper = new PoolMapper(DummyProcessHandle, false);
Assert.IsFalse(poolMapper.TryAttachBuffer(out _, ref addressInfo, 0, 0));
ClassicAssert.IsFalse(poolMapper.TryAttachBuffer(out _, ref addressInfo, 0, 0));
addressInfo.ForceMappedDspAddress = 0;
Assert.IsFalse(poolMapper.TryAttachBuffer(out errorInfo, ref addressInfo, CpuAddress, CpuSize));
ClassicAssert.IsFalse(poolMapper.TryAttachBuffer(out errorInfo, ref addressInfo, CpuAddress, CpuSize));
Assert.AreEqual(ResultCode.InvalidAddressInfo, errorInfo.ErrorCode);
Assert.AreEqual(CpuAddress, errorInfo.ExtraErrorInfo);
Assert.AreEqual(0, addressInfo.ForceMappedDspAddress);
ClassicAssert.AreEqual(ResultCode.InvalidAddressInfo, errorInfo.ErrorCode);
ClassicAssert.AreEqual(CpuAddress, errorInfo.ExtraErrorInfo);
ClassicAssert.AreEqual(0, addressInfo.ForceMappedDspAddress);
poolMapper = new PoolMapper(DummyProcessHandle, memoryPoolStateArray.AsMemory(), false);
Assert.IsFalse(poolMapper.TryAttachBuffer(out errorInfo, ref addressInfo, CpuAddressRegionEnding, CpuSize));
ClassicAssert.IsFalse(poolMapper.TryAttachBuffer(out errorInfo, ref addressInfo, CpuAddressRegionEnding, CpuSize));
Assert.AreEqual(ResultCode.InvalidAddressInfo, errorInfo.ErrorCode);
Assert.AreEqual(CpuAddressRegionEnding, errorInfo.ExtraErrorInfo);
Assert.AreEqual(0, addressInfo.ForceMappedDspAddress);
Assert.IsFalse(addressInfo.HasMemoryPoolState);
ClassicAssert.AreEqual(ResultCode.InvalidAddressInfo, errorInfo.ErrorCode);
ClassicAssert.AreEqual(CpuAddressRegionEnding, errorInfo.ExtraErrorInfo);
ClassicAssert.AreEqual(0, addressInfo.ForceMappedDspAddress);
ClassicAssert.IsFalse(addressInfo.HasMemoryPoolState);
Assert.IsTrue(poolMapper.TryAttachBuffer(out errorInfo, ref addressInfo, CpuAddress, CpuSize));
ClassicAssert.IsTrue(poolMapper.TryAttachBuffer(out errorInfo, ref addressInfo, CpuAddress, CpuSize));
Assert.AreEqual(ResultCode.Success, errorInfo.ErrorCode);
Assert.AreEqual(0, errorInfo.ExtraErrorInfo);
Assert.AreEqual(0, addressInfo.ForceMappedDspAddress);
Assert.IsTrue(addressInfo.HasMemoryPoolState);
ClassicAssert.AreEqual(ResultCode.Success, errorInfo.ErrorCode);
ClassicAssert.AreEqual(0, errorInfo.ExtraErrorInfo);
ClassicAssert.AreEqual(0, addressInfo.ForceMappedDspAddress);
ClassicAssert.IsTrue(addressInfo.HasMemoryPoolState);
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Server.Splitter;
using System.Runtime.CompilerServices;
@@ -9,8 +10,8 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0xE0, Unsafe.SizeOf<SplitterDestinationVersion1>());
Assert.AreEqual(0x128, Unsafe.SizeOf<SplitterDestinationVersion2>());
ClassicAssert.AreEqual(0xE0, Unsafe.SizeOf<SplitterDestinationVersion1>());
ClassicAssert.AreEqual(0x128, Unsafe.SizeOf<SplitterDestinationVersion2>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Server.Splitter;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x20, Unsafe.SizeOf<SplitterState>());
ClassicAssert.AreEqual(0x20, Unsafe.SizeOf<SplitterState>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Server.Voice;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0xD0, Unsafe.SizeOf<VoiceChannelResource>());
ClassicAssert.AreEqual(0xD0, Unsafe.SizeOf<VoiceChannelResource>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Server.Voice;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
[Test]
public void EnsureTypeSize()
{
Assert.LessOrEqual(Unsafe.SizeOf<VoiceInfo>(), 0x238);
ClassicAssert.LessOrEqual(Unsafe.SizeOf<VoiceInfo>(), 0x238);
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Server.Voice;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x58, Unsafe.SizeOf<WaveBuffer>());
ClassicAssert.AreEqual(0x58, Unsafe.SizeOf<WaveBuffer>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x70, Unsafe.SizeOf<VoiceChannelResourceInParameter>());
ClassicAssert.AreEqual(0x70, Unsafe.SizeOf<VoiceChannelResourceInParameter>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices;
@@ -9,8 +10,8 @@ namespace Ryujinx.Tests.Audio.Renderer
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x170, Unsafe.SizeOf<VoiceInParameter1>());
Assert.AreEqual(0x188, Unsafe.SizeOf<VoiceInParameter2>());
ClassicAssert.AreEqual(0x170, Unsafe.SizeOf<VoiceInParameter1>());
ClassicAssert.AreEqual(0x188, Unsafe.SizeOf<VoiceInParameter2>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices;
@@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x10, Unsafe.SizeOf<VoiceOutStatus>());
ClassicAssert.AreEqual(0x10, Unsafe.SizeOf<VoiceOutStatus>());
}
}
}
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Common.Extensions;
using Ryujinx.Memory;
using System;
@@ -31,7 +32,7 @@ namespace Ryujinx.Tests.Common.Extensions
ref readonly MyUnmanagedStruct read = ref sequenceReader.GetRefOrRefToCopy<MyUnmanagedStruct>(out _);
// Assert
MyUnmanagedStruct.Assert(Assert.AreEqual, original, read);
MyUnmanagedStruct.Assert(ClassicAssert.AreEqual, original, read);
}
}
@@ -51,8 +52,8 @@ namespace Ryujinx.Tests.Common.Extensions
ref readonly MyUnmanagedStruct read = ref sequenceReader.GetRefOrRefToCopy<MyUnmanagedStruct>(out var copy);
// Assert
MyUnmanagedStruct.Assert(Assert.AreEqual, original, read);
MyUnmanagedStruct.Assert(Assert.AreEqual, read, copy);
MyUnmanagedStruct.Assert(ClassicAssert.AreEqual, original, read);
MyUnmanagedStruct.Assert(ClassicAssert.AreEqual, read, copy);
}
}
@@ -72,8 +73,8 @@ namespace Ryujinx.Tests.Common.Extensions
ref readonly MyUnmanagedStruct read = ref sequenceReader.GetRefOrRefToCopy<MyUnmanagedStruct>(out var copy);
// Assert
MyUnmanagedStruct.Assert(Assert.AreEqual, original, read);
MyUnmanagedStruct.Assert(Assert.AreNotEqual, read, copy);
MyUnmanagedStruct.Assert(ClassicAssert.AreEqual, original, read);
MyUnmanagedStruct.Assert(ClassicAssert.AreNotEqual, read, copy);
}
}
@@ -86,7 +87,7 @@ namespace Ryujinx.Tests.Common.Extensions
ReadOnlySequence<byte> sequence = CreateSegmentedByteSequence(originalStructs, int.MaxValue);
// Act/Assert
Assert.Throws<ArgumentOutOfRangeException>(() =>
ClassicAssert.Throws<ArgumentOutOfRangeException>(() =>
{
var sequenceReader = new SequenceReader<byte>(sequence);
@@ -112,7 +113,7 @@ namespace Ryujinx.Tests.Common.Extensions
sequenceReader.ReadLittleEndian(out int roundTrippedValue);
// Assert
Assert.AreEqual(TestValue, roundTrippedValue);
ClassicAssert.AreEqual(TestValue, roundTrippedValue);
}
[Test]
@@ -131,7 +132,7 @@ namespace Ryujinx.Tests.Common.Extensions
sequenceReader.ReadLittleEndian(out int roundTrippedValue);
// Assert
Assert.AreNotEqual(TestValue, roundTrippedValue);
ClassicAssert.AreNotEqual(TestValue, roundTrippedValue);
}
[Test]
@@ -145,7 +146,7 @@ namespace Ryujinx.Tests.Common.Extensions
BinaryPrimitives.WriteInt32BigEndian(buffer.AsSpan(), TestValue);
// Act/Assert
Assert.Throws<ArgumentOutOfRangeException>(() =>
ClassicAssert.Throws<ArgumentOutOfRangeException>(() =>
{
var sequenceReader = new SequenceReader<byte>(new ReadOnlySequence<byte>(buffer));
sequenceReader.Advance(1);
@@ -171,7 +172,7 @@ namespace Ryujinx.Tests.Common.Extensions
ReadOnlySequence<byte> sequence = CreateSegmentedByteSequence(originalStructs, int.MaxValue);
// Act/Assert
Assert.Throws<ArgumentOutOfRangeException>(() =>
ClassicAssert.Throws<ArgumentOutOfRangeException>(() =>
{
var sequenceReader = new SequenceReader<byte>(sequence);
@@ -198,7 +199,7 @@ namespace Ryujinx.Tests.Common.Extensions
ReadOnlySequence<byte> sequence = CreateSegmentedByteSequence(originalStructs, MyUnmanagedStruct.SizeOf);
Assert.Throws<ArgumentOutOfRangeException>(() =>
ClassicAssert.Throws<ArgumentOutOfRangeException>(() =>
{
var sequenceReader = new SequenceReader<byte>(sequence);
@@ -221,7 +222,7 @@ namespace Ryujinx.Tests.Common.Extensions
sequenceReader.ReadUnmanaged(out MyUnmanagedStruct read);
// Assert
MyUnmanagedStruct.Assert(Assert.AreEqual, original, read);
MyUnmanagedStruct.Assert(ClassicAssert.AreEqual, original, read);
}
}
@@ -237,19 +238,19 @@ namespace Ryujinx.Tests.Common.Extensions
static void SetConsumedAndAssert(scoped ref SequenceReader<byte> sequenceReader, long consumed)
{
sequenceReader.SetConsumed(consumed);
Assert.AreEqual(consumed, sequenceReader.Consumed);
ClassicAssert.AreEqual(consumed, sequenceReader.Consumed);
}
// Act/Assert
ref readonly MyUnmanagedStruct struct0A = ref sequenceReader.GetRefOrRefToCopy<MyUnmanagedStruct>(out _);
Assert.AreEqual(sequenceReader.Consumed, MyUnmanagedStruct.SizeOf);
ClassicAssert.AreEqual(sequenceReader.Consumed, MyUnmanagedStruct.SizeOf);
SetConsumedAndAssert(ref sequenceReader, 0);
ref readonly MyUnmanagedStruct struct0B = ref sequenceReader.GetRefOrRefToCopy<MyUnmanagedStruct>(out _);
MyUnmanagedStruct.Assert(Assert.AreEqual, struct0A, struct0B);
MyUnmanagedStruct.Assert(ClassicAssert.AreEqual, struct0A, struct0B);
SetConsumedAndAssert(ref sequenceReader, 1);
@@ -261,7 +262,7 @@ namespace Ryujinx.Tests.Common.Extensions
ref readonly MyUnmanagedStruct struct1B = ref sequenceReader.GetRefOrRefToCopy<MyUnmanagedStruct>(out _);
MyUnmanagedStruct.Assert(Assert.AreEqual, struct1A, struct1B);
MyUnmanagedStruct.Assert(ClassicAssert.AreEqual, struct1A, struct1B);
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
+6 -5
View File
@@ -2,6 +2,7 @@ using ARMeilleure.Common;
using ARMeilleure.Memory;
using ARMeilleure.Translation;
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Cpu.Jit;
using Ryujinx.Tests.Memory;
using System;
@@ -48,7 +49,7 @@ namespace Ryujinx.Tests.Cpu
// Subnormal results are not flushed to zero by default.
// This operation should not be allowed to do constant propagation, hence the methods that explicitly disallow inlining.
Assert.AreNotEqual(GetDenormal() + GetZero(), 0f);
ClassicAssert.AreNotEqual(GetDenormal() + GetZero(), 0f);
bool methodCalled = false;
bool isFz = false;
@@ -61,11 +62,11 @@ namespace Ryujinx.Tests.Cpu
int result = method(Marshal.GetFunctionPointerForDelegate(ManagedMethod));
// Subnormal results are not flushed to zero by default, which we should have returned to exiting the method.
Assert.AreNotEqual(GetDenormal() + GetZero(), 0f);
ClassicAssert.AreNotEqual(GetDenormal() + GetZero(), 0f);
Assert.True(result == 0);
Assert.True(methodCalled);
Assert.True(isFz);
ClassicAssert.True(result == 0);
ClassicAssert.True(methodCalled);
ClassicAssert.True(isFz);
return;
void ManagedMethod()
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.HLE.HOS.Applets;
using System.Text;
@@ -9,13 +10,13 @@ namespace Ryujinx.Tests.HLE
[Test]
public void StripUnicodeControlCodes_NullInput()
{
Assert.IsNull(SoftwareKeyboardApplet.StripUnicodeControlCodes(null));
ClassicAssert.IsNull(SoftwareKeyboardApplet.StripUnicodeControlCodes(null));
}
[Test]
public void StripUnicodeControlCodes_EmptyInput()
{
Assert.AreEqual(string.Empty, SoftwareKeyboardApplet.StripUnicodeControlCodes(string.Empty));
ClassicAssert.AreEqual(string.Empty, SoftwareKeyboardApplet.StripUnicodeControlCodes(string.Empty));
}
[Test]
@@ -35,14 +36,14 @@ namespace Ryujinx.Tests.HLE
foreach (string prompt in prompts)
{
Assert.AreEqual(prompt, SoftwareKeyboardApplet.StripUnicodeControlCodes(prompt));
ClassicAssert.AreEqual(prompt, SoftwareKeyboardApplet.StripUnicodeControlCodes(prompt));
}
}
[Test]
public void StripUnicodeControlCodes_StripsNewlines()
{
Assert.AreEqual("I am very tall", SoftwareKeyboardApplet.StripUnicodeControlCodes("I \r\nam \r\nvery \r\ntall"));
ClassicAssert.AreEqual("I am very tall", SoftwareKeyboardApplet.StripUnicodeControlCodes("I \r\nam \r\nvery \r\ntall"));
}
[Test]
@@ -50,14 +51,14 @@ namespace Ryujinx.Tests.HLE
{
// 0x13 is control code DC3 used by some games
string specialInput = Encoding.UTF8.GetString(new byte[] { 0x13, 0x53, 0x68, 0x69, 0x6E, 0x65, 0x13 });
Assert.AreEqual("Shine", SoftwareKeyboardApplet.StripUnicodeControlCodes(specialInput));
ClassicAssert.AreEqual("Shine", SoftwareKeyboardApplet.StripUnicodeControlCodes(specialInput));
}
[Test]
public void StripUnicodeControlCodes_StripsToEmptyString()
{
string specialInput = Encoding.UTF8.GetString(new byte[] { 17, 18, 19, 20 }); // DC1 - DC4 special codes
Assert.AreEqual(string.Empty, SoftwareKeyboardApplet.StripUnicodeControlCodes(specialInput));
ClassicAssert.AreEqual(string.Empty, SoftwareKeyboardApplet.StripUnicodeControlCodes(specialInput));
}
[Test]
@@ -65,7 +66,7 @@ namespace Ryujinx.Tests.HLE
{
// Turtles are a good example of multi-codepoint Unicode chars
string specialInput = "♀ 🐢 🐢 ♂ ";
Assert.AreEqual(specialInput, SoftwareKeyboardApplet.StripUnicodeControlCodes(specialInput));
ClassicAssert.AreEqual(specialInput, SoftwareKeyboardApplet.StripUnicodeControlCodes(specialInput));
}
}
}
+18 -17
View File
@@ -3,6 +3,7 @@ using ARMeilleure.Memory;
using ARMeilleure.Signal;
using ARMeilleure.Translation;
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Common.Memory.PartialUnmaps;
using Ryujinx.Cpu;
using Ryujinx.Cpu.Jit;
@@ -159,13 +160,13 @@ namespace Ryujinx.Tests.Memory
if (OperatingSystem.IsWindows())
{
// One thread should be present on the thread local map. Trimming should remove it.
Assert.AreEqual(1, CountThreads(ref state));
ClassicAssert.AreEqual(1, CountThreads(ref state));
}
shouldAccess = false;
testThread.Join();
Assert.False(error);
ClassicAssert.False(error);
string test = null;
@@ -182,7 +183,7 @@ namespace Ryujinx.Tests.Memory
{
state.TrimThreads();
Assert.AreEqual(0, CountThreads(ref state));
ClassicAssert.AreEqual(0, CountThreads(ref state));
}
/*
@@ -272,7 +273,7 @@ namespace Ryujinx.Tests.Memory
writeLoopState.Running = 0;
testThread.Join();
Assert.False(writeLoopState.Error != 0);
ClassicAssert.False(writeLoopState.Error != 0);
}
finally
{
@@ -307,11 +308,11 @@ namespace Ryujinx.Tests.Memory
testThread.Start();
Thread.Sleep(200);
Assert.AreEqual(1, CountThreads(ref state));
ClassicAssert.AreEqual(1, CountThreads(ref state));
// Trimming should not remove the thread as it's still active.
state.TrimThreads();
Assert.AreEqual(1, CountThreads(ref state));
ClassicAssert.AreEqual(1, CountThreads(ref state));
running = false;
@@ -319,7 +320,7 @@ namespace Ryujinx.Tests.Memory
// Should trim now that it's inactive.
state.TrimThreads();
Assert.AreEqual(0, CountThreads(ref state));
ClassicAssert.AreEqual(0, CountThreads(ref state));
}
[Test]
@@ -340,35 +341,35 @@ namespace Ryujinx.Tests.Memory
for (int i = 0; i < ThreadLocalMap<int>.MapSize; i++)
{
// Should obtain the index matching the call #.
Assert.AreEqual(i, getOrReserve(i + 1, i));
ClassicAssert.AreEqual(i, getOrReserve(i + 1, i));
// Check that this and all previously reserved thread IDs and struct contents are intact.
for (int j = 0; j <= i; j++)
{
Assert.AreEqual(j + 1, state.LocalCounts.ThreadIds[j]);
Assert.AreEqual(j, state.LocalCounts.Structs[j]);
ClassicAssert.AreEqual(j + 1, state.LocalCounts.ThreadIds[j]);
ClassicAssert.AreEqual(j, state.LocalCounts.Structs[j]);
}
}
// Trying to reserve again when the map is full should return -1.
Assert.AreEqual(-1, getOrReserve(200, 0));
ClassicAssert.AreEqual(-1, getOrReserve(200, 0));
for (int i = 0; i < ThreadLocalMap<int>.MapSize; i++)
{
// Should obtain the index matching the call #, as it already exists.
Assert.AreEqual(i, getOrReserve(i + 1, -1));
ClassicAssert.AreEqual(i, getOrReserve(i + 1, -1));
// The struct should not be reset to -1.
Assert.AreEqual(i, state.LocalCounts.Structs[i]);
ClassicAssert.AreEqual(i, state.LocalCounts.Structs[i]);
}
// Clear one of the ids as if it were freed.
state.LocalCounts.ThreadIds[13] = 0;
// GetOrReserve should now obtain and return 13.
Assert.AreEqual(13, getOrReserve(300, 301));
Assert.AreEqual(300, state.LocalCounts.ThreadIds[13]);
Assert.AreEqual(301, state.LocalCounts.Structs[13]);
ClassicAssert.AreEqual(13, getOrReserve(300, 301));
ClassicAssert.AreEqual(300, state.LocalCounts.ThreadIds[13]);
ClassicAssert.AreEqual(301, state.LocalCounts.Structs[13]);
}
}
@@ -467,7 +468,7 @@ namespace Ryujinx.Tests.Memory
thread.Join();
}
Assert.False(error);
ClassicAssert.False(error);
}
}
}
+2 -1
View File
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.HLE.HOS.Services.Time.TimeZone;
using System.Runtime.CompilerServices;
@@ -11,7 +12,7 @@ namespace Ryujinx.Tests.Time
[Test]
public void EnsureTypeSize()
{
Assert.AreEqual(0x4000, Unsafe.SizeOf<TimeZoneRule>());
ClassicAssert.AreEqual(0x4000, Unsafe.SizeOf<TimeZoneRule>());
}
}
}
+81 -80
View File
@@ -1,4 +1,5 @@
using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Common.Collections;
using System;
using System.Collections.Generic;
@@ -12,7 +13,7 @@ namespace Ryujinx.Tests.Collections
{
TreeDictionary<int, int> dictionary = new();
Assert.AreEqual(dictionary.Count, 0);
ClassicAssert.AreEqual(dictionary.Count, 0);
dictionary.Add(2, 7);
dictionary.Add(1, 4);
@@ -22,7 +23,7 @@ namespace Ryujinx.Tests.Collections
dictionary.Add(11, 2);
dictionary.Add(5, 2);
Assert.AreEqual(dictionary.Count, 7);
ClassicAssert.AreEqual(dictionary.Count, 7);
List<KeyValuePair<int, int>> list = dictionary.AsLevelOrderList();
@@ -36,14 +37,14 @@ namespace Ryujinx.Tests.Collections
*
*/
Assert.AreEqual(list.Count, dictionary.Count);
Assert.AreEqual(list[0].Key, 2);
Assert.AreEqual(list[1].Key, 1);
Assert.AreEqual(list[2].Key, 4);
Assert.AreEqual(list[3].Key, 3);
Assert.AreEqual(list[4].Key, 10);
Assert.AreEqual(list[5].Key, 5);
Assert.AreEqual(list[6].Key, 11);
ClassicAssert.AreEqual(list.Count, dictionary.Count);
ClassicAssert.AreEqual(list[0].Key, 2);
ClassicAssert.AreEqual(list[1].Key, 1);
ClassicAssert.AreEqual(list[2].Key, 4);
ClassicAssert.AreEqual(list[3].Key, 3);
ClassicAssert.AreEqual(list[4].Key, 10);
ClassicAssert.AreEqual(list[5].Key, 5);
ClassicAssert.AreEqual(list[6].Key, 11);
}
[Test]
@@ -51,7 +52,7 @@ namespace Ryujinx.Tests.Collections
{
TreeDictionary<int, int> dictionary = new();
Assert.AreEqual(dictionary.Count, 0);
ClassicAssert.AreEqual(dictionary.Count, 0);
dictionary.Add(2, 7);
dictionary.Add(1, 4);
@@ -66,7 +67,7 @@ namespace Ryujinx.Tests.Collections
dictionary.Add(13, 2);
dictionary.Add(24, 2);
dictionary.Add(6, 2);
Assert.AreEqual(dictionary.Count, 13);
ClassicAssert.AreEqual(dictionary.Count, 13);
List<KeyValuePair<int, int>> list = dictionary.AsLevelOrderList();
@@ -84,20 +85,20 @@ namespace Ryujinx.Tests.Collections
{
Console.WriteLine($"{node.Key} -> {node.Value}");
}
Assert.AreEqual(list.Count, dictionary.Count);
Assert.AreEqual(list[0].Key, 4);
Assert.AreEqual(list[1].Key, 2);
Assert.AreEqual(list[2].Key, 10);
Assert.AreEqual(list[3].Key, 1);
Assert.AreEqual(list[4].Key, 3);
Assert.AreEqual(list[5].Key, 7);
Assert.AreEqual(list[6].Key, 13);
Assert.AreEqual(list[7].Key, 5);
Assert.AreEqual(list[8].Key, 9);
Assert.AreEqual(list[9].Key, 11);
Assert.AreEqual(list[10].Key, 24);
Assert.AreEqual(list[11].Key, 6);
Assert.AreEqual(list[12].Key, 8);
ClassicAssert.AreEqual(list.Count, dictionary.Count);
ClassicAssert.AreEqual(list[0].Key, 4);
ClassicAssert.AreEqual(list[1].Key, 2);
ClassicAssert.AreEqual(list[2].Key, 10);
ClassicAssert.AreEqual(list[3].Key, 1);
ClassicAssert.AreEqual(list[4].Key, 3);
ClassicAssert.AreEqual(list[5].Key, 7);
ClassicAssert.AreEqual(list[6].Key, 13);
ClassicAssert.AreEqual(list[7].Key, 5);
ClassicAssert.AreEqual(list[8].Key, 9);
ClassicAssert.AreEqual(list[9].Key, 11);
ClassicAssert.AreEqual(list[10].Key, 24);
ClassicAssert.AreEqual(list[11].Key, 6);
ClassicAssert.AreEqual(list[12].Key, 8);
list.Clear();
@@ -118,18 +119,18 @@ namespace Ryujinx.Tests.Collections
{
Console.WriteLine($"{node.Key} -> {node.Value}");
}
Assert.AreEqual(list[0].Key, 4);
Assert.AreEqual(list[1].Key, 2);
Assert.AreEqual(list[2].Key, 10);
Assert.AreEqual(list[3].Key, 1);
Assert.AreEqual(list[4].Key, 3);
Assert.AreEqual(list[5].Key, 6);
Assert.AreEqual(list[6].Key, 13);
Assert.AreEqual(list[7].Key, 5);
Assert.AreEqual(list[8].Key, 9);
Assert.AreEqual(list[9].Key, 11);
Assert.AreEqual(list[10].Key, 24);
Assert.AreEqual(list[11].Key, 8);
ClassicAssert.AreEqual(list[0].Key, 4);
ClassicAssert.AreEqual(list[1].Key, 2);
ClassicAssert.AreEqual(list[2].Key, 10);
ClassicAssert.AreEqual(list[3].Key, 1);
ClassicAssert.AreEqual(list[4].Key, 3);
ClassicAssert.AreEqual(list[5].Key, 6);
ClassicAssert.AreEqual(list[6].Key, 13);
ClassicAssert.AreEqual(list[7].Key, 5);
ClassicAssert.AreEqual(list[8].Key, 9);
ClassicAssert.AreEqual(list[9].Key, 11);
ClassicAssert.AreEqual(list[10].Key, 24);
ClassicAssert.AreEqual(list[11].Key, 8);
list.Clear();
@@ -149,17 +150,17 @@ namespace Ryujinx.Tests.Collections
{
Console.WriteLine($"{node.Key} -> {node.Value}");
}
Assert.AreEqual(list[0].Key, 4);
Assert.AreEqual(list[1].Key, 2);
Assert.AreEqual(list[2].Key, 9);
Assert.AreEqual(list[3].Key, 1);
Assert.AreEqual(list[4].Key, 3);
Assert.AreEqual(list[5].Key, 6);
Assert.AreEqual(list[6].Key, 13);
Assert.AreEqual(list[7].Key, 5);
Assert.AreEqual(list[8].Key, 8);
Assert.AreEqual(list[9].Key, 11);
Assert.AreEqual(list[10].Key, 24);
ClassicAssert.AreEqual(list[0].Key, 4);
ClassicAssert.AreEqual(list[1].Key, 2);
ClassicAssert.AreEqual(list[2].Key, 9);
ClassicAssert.AreEqual(list[3].Key, 1);
ClassicAssert.AreEqual(list[4].Key, 3);
ClassicAssert.AreEqual(list[5].Key, 6);
ClassicAssert.AreEqual(list[6].Key, 13);
ClassicAssert.AreEqual(list[7].Key, 5);
ClassicAssert.AreEqual(list[8].Key, 8);
ClassicAssert.AreEqual(list[9].Key, 11);
ClassicAssert.AreEqual(list[10].Key, 24);
}
[Test]
@@ -167,7 +168,7 @@ namespace Ryujinx.Tests.Collections
{
TreeDictionary<int, int> dictionary = new();
Assert.AreEqual(dictionary.Count, 0);
ClassicAssert.AreEqual(dictionary.Count, 0);
dictionary.Add(2, 7);
dictionary.Add(1, 4);
@@ -182,7 +183,7 @@ namespace Ryujinx.Tests.Collections
dictionary.Add(13, 2);
dictionary.Add(24, 2);
dictionary.Add(6, 2);
Assert.AreEqual(dictionary.Count, 13);
ClassicAssert.AreEqual(dictionary.Count, 13);
List<KeyValuePair<int, int>> list = dictionary.AsLevelOrderList();
@@ -201,44 +202,44 @@ namespace Ryujinx.Tests.Collections
* 6 8
*/
Assert.AreEqual(list.Count, dictionary.Count);
Assert.AreEqual(list[0].Key, 4);
Assert.AreEqual(list[1].Key, 2);
Assert.AreEqual(list[2].Key, 10);
Assert.AreEqual(list[3].Key, 1);
Assert.AreEqual(list[4].Key, 3);
Assert.AreEqual(list[5].Key, 7);
Assert.AreEqual(list[6].Key, 13);
Assert.AreEqual(list[7].Key, 5);
Assert.AreEqual(list[8].Key, 9);
Assert.AreEqual(list[9].Key, 11);
Assert.AreEqual(list[10].Key, 24);
Assert.AreEqual(list[11].Key, 6);
Assert.AreEqual(list[12].Key, 8);
ClassicAssert.AreEqual(list.Count, dictionary.Count);
ClassicAssert.AreEqual(list[0].Key, 4);
ClassicAssert.AreEqual(list[1].Key, 2);
ClassicAssert.AreEqual(list[2].Key, 10);
ClassicAssert.AreEqual(list[3].Key, 1);
ClassicAssert.AreEqual(list[4].Key, 3);
ClassicAssert.AreEqual(list[5].Key, 7);
ClassicAssert.AreEqual(list[6].Key, 13);
ClassicAssert.AreEqual(list[7].Key, 5);
ClassicAssert.AreEqual(list[8].Key, 9);
ClassicAssert.AreEqual(list[9].Key, 11);
ClassicAssert.AreEqual(list[10].Key, 24);
ClassicAssert.AreEqual(list[11].Key, 6);
ClassicAssert.AreEqual(list[12].Key, 8);
Assert.AreEqual(list[4].Value, 2);
ClassicAssert.AreEqual(list[4].Value, 2);
dictionary.Add(3, 4);
list = dictionary.AsLevelOrderList();
Assert.AreEqual(list[4].Value, 4);
ClassicAssert.AreEqual(list[4].Value, 4);
// Assure that none of the nodes locations have been modified.
Assert.AreEqual(list[0].Key, 4);
Assert.AreEqual(list[1].Key, 2);
Assert.AreEqual(list[2].Key, 10);
Assert.AreEqual(list[3].Key, 1);
Assert.AreEqual(list[4].Key, 3);
Assert.AreEqual(list[5].Key, 7);
Assert.AreEqual(list[6].Key, 13);
Assert.AreEqual(list[7].Key, 5);
Assert.AreEqual(list[8].Key, 9);
Assert.AreEqual(list[9].Key, 11);
Assert.AreEqual(list[10].Key, 24);
Assert.AreEqual(list[11].Key, 6);
Assert.AreEqual(list[12].Key, 8);
ClassicAssert.AreEqual(list[0].Key, 4);
ClassicAssert.AreEqual(list[1].Key, 2);
ClassicAssert.AreEqual(list[2].Key, 10);
ClassicAssert.AreEqual(list[3].Key, 1);
ClassicAssert.AreEqual(list[4].Key, 3);
ClassicAssert.AreEqual(list[5].Key, 7);
ClassicAssert.AreEqual(list[6].Key, 13);
ClassicAssert.AreEqual(list[7].Key, 5);
ClassicAssert.AreEqual(list[8].Key, 9);
ClassicAssert.AreEqual(list[9].Key, 11);
ClassicAssert.AreEqual(list[10].Key, 24);
ClassicAssert.AreEqual(list[11].Key, 6);
ClassicAssert.AreEqual(list[12].Key, 8);
}
}
}