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 2025-10-19 23:01:06 -05:00
parent 1724149443
commit 280461dc78
54 changed files with 629 additions and 576 deletions

View file

@ -24,8 +24,8 @@
<PackageVersion Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" /> <PackageVersion Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
<PackageVersion Include="MsgPack.Cli" Version="1.0.1" /> <PackageVersion Include="MsgPack.Cli" Version="1.0.1" />
<PackageVersion Include="NetCoreServer" Version="8.0.7" /> <PackageVersion Include="NetCoreServer" Version="8.0.7" />
<PackageVersion Include="NUnit" Version="3.13.3" /> <PackageVersion Include="NUnit" Version="4.4.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.1.0" /> <PackageVersion Include="NUnit3TestAdapter" Version="5.2.0" />
<PackageVersion Include="OpenTK.Core" Version="4.9.4" /> <PackageVersion Include="OpenTK.Core" Version="4.9.4" />
<PackageVersion Include="OpenTK.Graphics" Version="4.9.4" /> <PackageVersion Include="OpenTK.Graphics" Version="4.9.4" />
<PackageVersion Include="OpenTK.Audio.OpenAL" Version="4.9.4" /> <PackageVersion Include="OpenTK.Audio.OpenAL" Version="4.9.4" />

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Memory; using Ryujinx.Memory;
using Ryujinx.Memory.Tracking; using Ryujinx.Memory.Tracking;
using System; using System;
@ -56,8 +57,8 @@ namespace Ryujinx.Tests.Memory
handle.QueryModified(startAddress, size, (address, _) => handle.QueryModified(startAddress, size, (address, _) =>
{ {
Assert.IsTrue(addressPredicate(address)); // Written pages must be even. ClassicAssert.IsTrue(addressPredicate(address)); // Written pages must be even.
Assert.GreaterOrEqual(address, lastAddress); // Must be signalled in ascending order, regardless of write order. ClassicAssert.GreaterOrEqual(address, lastAddress); // Must be signalled in ascending order, regardless of write order.
lastAddress = address; lastAddress = address;
regionCount++; regionCount++;
}); });
@ -72,8 +73,8 @@ namespace Ryujinx.Tests.Memory
handle.QueryModified(startAddress, size, (address, _) => handle.QueryModified(startAddress, size, (address, _) =>
{ {
Assert.IsTrue(addressPredicate(address)); // Written pages must be even. ClassicAssert.IsTrue(addressPredicate(address)); // Written pages must be even.
Assert.GreaterOrEqual(address, lastAddress); // Must be signalled in ascending order, regardless of write order. ClassicAssert.GreaterOrEqual(address, lastAddress); // Must be signalled in ascending order, regardless of write order.
lastAddress = address; lastAddress = address;
regionCount++; regionCount++;
}, sequenceNumber); }, sequenceNumber);
@ -93,7 +94,7 @@ namespace Ryujinx.Tests.Memory
{ {
resultAddress = address; resultAddress = address;
}); });
Assert.AreEqual(resultAddress, (ulong)i * PageSize + address); ClassicAssert.AreEqual(resultAddress, (ulong)i * PageSize + address);
}); });
} }
@ -119,7 +120,7 @@ namespace Ryujinx.Tests.Memory
int oddRegionCount = ExpectQueryInOrder(handle, 0, PageSize * PageCount, (address) => (address / PageSize) % 2 == 1); int oddRegionCount = ExpectQueryInOrder(handle, 0, PageSize * PageCount, (address) => (address / PageSize) % 2 == 1);
Assert.AreEqual(oddRegionCount, PageCount / 2); // Must have written to all odd pages. ClassicAssert.AreEqual(oddRegionCount, PageCount / 2); // Must have written to all odd pages.
// Write to all the even pages. // Write to all the even pages.
RandomOrder(random, even, (i) => RandomOrder(random, even, (i) =>
@ -129,7 +130,7 @@ namespace Ryujinx.Tests.Memory
int evenRegionCount = ExpectQueryInOrder(handle, 0, PageSize * PageCount, (address) => (address / PageSize) % 2 == 0); int evenRegionCount = ExpectQueryInOrder(handle, 0, PageSize * PageCount, (address) => (address / PageSize) % 2 == 0);
Assert.AreEqual(evenRegionCount, PageCount / 2); ClassicAssert.AreEqual(evenRegionCount, PageCount / 2);
} }
[Test] [Test]
@ -172,7 +173,7 @@ namespace Ryujinx.Tests.Memory
}, 1); }, 1);
} }
Assert.AreEqual(oddRegionCount, PageCount / 2); // Must have written to all odd pages. ClassicAssert.AreEqual(oddRegionCount, PageCount / 2); // Must have written to all odd pages.
// Write to all pages. // Write to all pages.
@ -182,19 +183,19 @@ namespace Ryujinx.Tests.Memory
int evenRegionCount = ExpectQueryInOrder(handle, 0, PageSize * PageCount, (address) => (address / PageSize) % 2 == 0, 1); int evenRegionCount = ExpectQueryInOrder(handle, 0, PageSize * PageCount, (address) => (address / PageSize) % 2 == 0, 1);
Assert.AreEqual(evenRegionCount, PageCount / 2); // Must have written to all even pages. ClassicAssert.AreEqual(evenRegionCount, PageCount / 2); // Must have written to all even pages.
oddRegionCount = 0; oddRegionCount = 0;
handle.QueryModified(0, PageSize * PageCount, (_, _) => { oddRegionCount++; }, 1); handle.QueryModified(0, PageSize * PageCount, (_, _) => { oddRegionCount++; }, 1);
Assert.AreEqual(oddRegionCount, 0); // Sequence number has not changed, so found no dirty subregions. ClassicAssert.AreEqual(oddRegionCount, 0); // Sequence number has not changed, so found no dirty subregions.
// With sequence number 2, all all pages should be reported as modified. // With sequence number 2, all all pages should be reported as modified.
oddRegionCount = ExpectQueryInOrder(handle, 0, PageSize * PageCount, (address) => (address / PageSize) % 2 == 1, 2); oddRegionCount = ExpectQueryInOrder(handle, 0, PageSize * PageCount, (address) => (address / PageSize) % 2 == 1, 2);
Assert.AreEqual(oddRegionCount, PageCount / 2); // Must have written to all odd pages. ClassicAssert.AreEqual(oddRegionCount, PageCount / 2); // Must have written to all odd pages.
} }
[Test] [Test]
@ -242,8 +243,8 @@ namespace Ryujinx.Tests.Memory
{ {
int region = regionSizes[regionInd++]; int region = regionSizes[regionInd++];
Assert.AreEqual(address, expectedAddress); ClassicAssert.AreEqual(address, expectedAddress);
Assert.AreEqual(size, (ulong)(PageSize * region)); ClassicAssert.AreEqual(size, (ulong)(PageSize * region));
expectedAddress += (ulong)(PageSize * (region + 1)); expectedAddress += (ulong)(PageSize * (region + 1));
}); });
@ -256,12 +257,12 @@ namespace Ryujinx.Tests.Memory
const int PageCount = 32; const int PageCount = 32;
const int OverlapStart = 16; const int OverlapStart = 16;
Assert.AreEqual(0, _tracking.GetRegionCount()); ClassicAssert.AreEqual(0, _tracking.GetRegionCount());
IMultiRegionHandle handleLow = GetGranular(smart, 0, PageSize * PageCount, PageSize); IMultiRegionHandle handleLow = GetGranular(smart, 0, PageSize * PageCount, PageSize);
PreparePages(handleLow, PageCount); PreparePages(handleLow, PageCount);
Assert.AreEqual(PageCount, _tracking.GetRegionCount()); ClassicAssert.AreEqual(PageCount, _tracking.GetRegionCount());
IMultiRegionHandle handleHigh = GetGranular(smart, PageSize * OverlapStart, PageSize * PageCount, PageSize); IMultiRegionHandle handleHigh = GetGranular(smart, PageSize * OverlapStart, PageSize * PageCount, PageSize);
PreparePages(handleHigh, PageCount, PageSize * OverlapStart); PreparePages(handleHigh, PageCount, PageSize * OverlapStart);
@ -269,15 +270,15 @@ namespace Ryujinx.Tests.Memory
// Combined pages (and assuming overlapStart <= pageCount) should be pageCount after overlapStart. // Combined pages (and assuming overlapStart <= pageCount) should be pageCount after overlapStart.
int totalPages = OverlapStart + PageCount; int totalPages = OverlapStart + PageCount;
Assert.AreEqual(totalPages, _tracking.GetRegionCount()); ClassicAssert.AreEqual(totalPages, _tracking.GetRegionCount());
handleLow.Dispose(); // After disposing one, the pages for the other remain. handleLow.Dispose(); // After disposing one, the pages for the other remain.
Assert.AreEqual(PageCount, _tracking.GetRegionCount()); ClassicAssert.AreEqual(PageCount, _tracking.GetRegionCount());
handleHigh.Dispose(); // After disposing the other, there are no pages left. handleHigh.Dispose(); // After disposing the other, there are no pages left.
Assert.AreEqual(0, _tracking.GetRegionCount()); ClassicAssert.AreEqual(0, _tracking.GetRegionCount());
} }
[Test] [Test]
@ -357,19 +358,19 @@ namespace Ryujinx.Tests.Memory
bool modified = false; bool modified = false;
combined.QueryModified(PageSize * (ulong)i, PageSize, (_, _) => { modified = true; }); combined.QueryModified(PageSize * (ulong)i, PageSize, (_, _) => { modified = true; });
Assert.AreEqual(expectedDirty[i], modified); ClassicAssert.AreEqual(expectedDirty[i], modified);
} }
Assert.AreEqual(new bool[3], actionsTriggered); ClassicAssert.AreEqual(new bool[3], actionsTriggered);
_tracking.VirtualMemoryEvent(PageSize * 5, PageSize, false); _tracking.VirtualMemoryEvent(PageSize * 5, PageSize, false);
Assert.IsTrue(actionsTriggered[0]); ClassicAssert.IsTrue(actionsTriggered[0]);
_tracking.VirtualMemoryEvent(PageSize * 10, PageSize, false); _tracking.VirtualMemoryEvent(PageSize * 10, PageSize, false);
Assert.IsTrue(actionsTriggered[1]); ClassicAssert.IsTrue(actionsTriggered[1]);
_tracking.VirtualMemoryEvent(PageSize * 15, PageSize, false); _tracking.VirtualMemoryEvent(PageSize * 15, PageSize, false);
Assert.IsTrue(actionsTriggered[2]); ClassicAssert.IsTrue(actionsTriggered[2]);
// The double page handles should be disposed, as they were split into granular handles. // The double page handles should be disposed, as they were split into granular handles.
foreach (RegionHandle doublePage in doublePages) foreach (RegionHandle doublePage in doublePages)
@ -386,18 +387,18 @@ namespace Ryujinx.Tests.Memory
throws = true; throws = true;
} }
Assert.IsTrue(throws); ClassicAssert.IsTrue(throws);
} }
IEnumerable<IRegionHandle> combinedHandles = combined.GetHandles(); IEnumerable<IRegionHandle> combinedHandles = combined.GetHandles();
Assert.AreEqual(handleGroups[0].ElementAt(0), combinedHandles.ElementAt(3)); ClassicAssert.AreEqual(handleGroups[0].ElementAt(0), combinedHandles.ElementAt(3));
Assert.AreEqual(handleGroups[0].ElementAt(1), combinedHandles.ElementAt(4)); ClassicAssert.AreEqual(handleGroups[0].ElementAt(1), combinedHandles.ElementAt(4));
Assert.AreEqual(handleGroups[0].ElementAt(2), combinedHandles.ElementAt(5)); ClassicAssert.AreEqual(handleGroups[0].ElementAt(2), combinedHandles.ElementAt(5));
Assert.AreEqual(singlePages[0], combinedHandles.ElementAt(8)); ClassicAssert.AreEqual(singlePages[0], combinedHandles.ElementAt(8));
Assert.AreEqual(singlePages[1], combinedHandles.ElementAt(9)); ClassicAssert.AreEqual(singlePages[1], combinedHandles.ElementAt(9));
Assert.AreEqual(singlePages[2], combinedHandles.ElementAt(10)); ClassicAssert.AreEqual(singlePages[2], combinedHandles.ElementAt(10));
} }
[Test] [Test]
@ -413,11 +414,11 @@ namespace Ryujinx.Tests.Memory
// Precise write to first handle in the multiregion. // Precise write to first handle in the multiregion.
_tracking.VirtualMemoryEvent(PageSize * 3, PageSize, true, precise: true); _tracking.VirtualMemoryEvent(PageSize * 3, PageSize, true, precise: true);
Assert.IsFalse(actionTriggered); // Action not triggered. ClassicAssert.IsFalse(actionTriggered); // Action not triggered.
bool firstPageModified = false; bool firstPageModified = false;
granular.QueryModified(PageSize * 3, PageSize, (_, _) => { firstPageModified = true; }); granular.QueryModified(PageSize * 3, PageSize, (_, _) => { firstPageModified = true; });
Assert.IsTrue(firstPageModified); // First page is modified. ClassicAssert.IsTrue(firstPageModified); // First page is modified.
// Precise write to all handles in the multiregion. // Precise write to all handles in the multiregion.
_tracking.VirtualMemoryEvent(PageSize * 3, PageSize * 3, true, precise: true); _tracking.VirtualMemoryEvent(PageSize * 3, PageSize * 3, true, precise: true);
@ -430,10 +431,10 @@ namespace Ryujinx.Tests.Memory
granular.QueryModified(PageSize * (ulong)i, PageSize, (_, _) => { pagesModified[index] = true; }); granular.QueryModified(PageSize * (ulong)i, PageSize, (_, _) => { pagesModified[index] = true; });
} }
Assert.IsTrue(actionTriggered); // Action triggered. ClassicAssert.IsTrue(actionTriggered); // Action triggered.
// Precise writes are ignored on two later handles due to the action returning true. // Precise writes are ignored on two later handles due to the action returning true.
Assert.AreEqual(pagesModified, new bool[] { true, false, false }); ClassicAssert.AreEqual(pagesModified, new bool[] { true, false, false });
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Memory; using Ryujinx.Memory;
using System; using System;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
@ -28,7 +29,7 @@ namespace Ryujinx.Tests.Memory
{ {
Marshal.WriteInt32(_memoryBlock.Pointer, 0x2020, 0x1234abcd); Marshal.WriteInt32(_memoryBlock.Pointer, 0x2020, 0x1234abcd);
Assert.AreEqual(_memoryBlock.Read<int>(0x2020), 0x1234abcd); ClassicAssert.AreEqual(_memoryBlock.Read<int>(0x2020), 0x1234abcd);
} }
[Test] [Test]
@ -36,7 +37,7 @@ namespace Ryujinx.Tests.Memory
{ {
_memoryBlock.Write(0x2040, 0xbadc0de); _memoryBlock.Write(0x2040, 0xbadc0de);
Assert.AreEqual(Marshal.ReadInt32(_memoryBlock.Pointer, 0x2040), 0xbadc0de); ClassicAssert.AreEqual(Marshal.ReadInt32(_memoryBlock.Pointer, 0x2040), 0xbadc0de);
} }
[Test] [Test]
@ -54,7 +55,7 @@ namespace Ryujinx.Tests.Memory
toAlias.UnmapView(backing, pageSize * 3, pageSize); toAlias.UnmapView(backing, pageSize * 3, pageSize);
toAlias.Write(0, 0xbadc0de); toAlias.Write(0, 0xbadc0de);
Assert.AreEqual(Marshal.ReadInt32(backing.Pointer, (int)pageSize), 0xbadc0de); ClassicAssert.AreEqual(Marshal.ReadInt32(backing.Pointer, (int)pageSize), 0xbadc0de);
} }
[Test] [Test]
@ -84,7 +85,7 @@ namespace Ryujinx.Tests.Memory
int offset = rng.Next(0, (int)pageSize - sizeof(int)); int offset = rng.Next(0, (int)pageSize - sizeof(int));
toAlias.Write((ulong)((dstPage << pageBits) + offset), 0xbadc0de); toAlias.Write((ulong)((dstPage << pageBits) + offset), 0xbadc0de);
Assert.AreEqual(Marshal.ReadInt32(backing.Pointer, (srcPage << pageBits) + offset), 0xbadc0de); ClassicAssert.AreEqual(Marshal.ReadInt32(backing.Pointer, (srcPage << pageBits) + offset), 0xbadc0de);
} }
else else
{ {
@ -109,7 +110,7 @@ namespace Ryujinx.Tests.Memory
toAlias.MapView(backing, 0, offset, pageSize); toAlias.MapView(backing, 0, offset, pageSize);
toAlias.Write(offset, 0xbadc0de); toAlias.Write(offset, 0xbadc0de);
Assert.AreEqual(0xbadc0de, backing.Read<int>(0)); ClassicAssert.AreEqual(0xbadc0de, backing.Read<int>(0));
toAlias.UnmapView(backing, offset, pageSize); toAlias.UnmapView(backing, offset, pageSize);
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Memory; using Ryujinx.Memory;
using Ryujinx.Memory.Tracking; using Ryujinx.Memory.Tracking;
using System; using System;
@ -53,46 +54,46 @@ namespace Ryujinx.Tests.Memory
}); });
bool dirtyInitial = handle.Dirty; bool dirtyInitial = handle.Dirty;
Assert.True(dirtyInitial); // Handle starts dirty. ClassicAssert.True(dirtyInitial); // Handle starts dirty.
handle.Reprotect(); handle.Reprotect();
bool dirtyAfterReprotect = handle.Dirty; bool dirtyAfterReprotect = handle.Dirty;
Assert.False(dirtyAfterReprotect); // Handle is no longer dirty. ClassicAssert.False(dirtyAfterReprotect); // Handle is no longer dirty.
_tracking.VirtualMemoryEvent(PageSize * 2, 4, true); _tracking.VirtualMemoryEvent(PageSize * 2, 4, true);
_tracking.VirtualMemoryEvent(PageSize * 2, 4, false); _tracking.VirtualMemoryEvent(PageSize * 2, 4, false);
bool dirtyAfterUnrelatedReadWrite = handle.Dirty; bool dirtyAfterUnrelatedReadWrite = handle.Dirty;
Assert.False(dirtyAfterUnrelatedReadWrite); // Not dirtied, as the write was to an unrelated address. ClassicAssert.False(dirtyAfterUnrelatedReadWrite); // Not dirtied, as the write was to an unrelated address.
Assert.IsNull(readTrackingTriggered); // Hasn't been triggered yet ClassicAssert.IsNull(readTrackingTriggered); // Hasn't been triggered yet
_tracking.VirtualMemoryEvent(0, 4, false); _tracking.VirtualMemoryEvent(0, 4, false);
bool dirtyAfterRelatedRead = handle.Dirty; bool dirtyAfterRelatedRead = handle.Dirty;
Assert.False(dirtyAfterRelatedRead); // Only triggers on write. ClassicAssert.False(dirtyAfterRelatedRead); // Only triggers on write.
Assert.AreEqual(readTrackingTriggered, (0UL, 4UL)); // Read action was triggered. ClassicAssert.AreEqual(readTrackingTriggered, (0UL, 4UL)); // Read action was triggered.
readTrackingTriggered = null; readTrackingTriggered = null;
_tracking.VirtualMemoryEvent(0, 4, true); _tracking.VirtualMemoryEvent(0, 4, true);
bool dirtyAfterRelatedWrite = handle.Dirty; bool dirtyAfterRelatedWrite = handle.Dirty;
Assert.True(dirtyAfterRelatedWrite); // Dirty flag should now be set. ClassicAssert.True(dirtyAfterRelatedWrite); // Dirty flag should now be set.
_tracking.VirtualMemoryEvent(4, 4, true); _tracking.VirtualMemoryEvent(4, 4, true);
bool dirtyAfterRelatedWrite2 = handle.Dirty; bool dirtyAfterRelatedWrite2 = handle.Dirty;
Assert.True(dirtyAfterRelatedWrite2); // Dirty flag should still be set. ClassicAssert.True(dirtyAfterRelatedWrite2); // Dirty flag should still be set.
handle.Reprotect(); handle.Reprotect();
bool dirtyAfterReprotect2 = handle.Dirty; bool dirtyAfterReprotect2 = handle.Dirty;
Assert.False(dirtyAfterReprotect2); // Handle is no longer dirty. ClassicAssert.False(dirtyAfterReprotect2); // Handle is no longer dirty.
handle.Dispose(); handle.Dispose();
bool dirtyAfterDispose = TestSingleWrite(handle, 0, 4); bool dirtyAfterDispose = TestSingleWrite(handle, 0, 4);
Assert.False(dirtyAfterDispose); // Handle cannot be triggered when disposed ClassicAssert.False(dirtyAfterDispose); // Handle cannot be triggered when disposed
} }
[Test] [Test]
@ -126,27 +127,27 @@ namespace Ryujinx.Tests.Memory
for (int i = 0; i < 16; i++) for (int i = 0; i < 16; i++)
{ {
// No handles are dirty. // No handles are dirty.
Assert.False(allHandle.Dirty); ClassicAssert.False(allHandle.Dirty);
Assert.IsNull(readTrackingTriggeredAll); ClassicAssert.IsNull(readTrackingTriggeredAll);
for (int j = 0; j < 16; j++) for (int j = 0; j < 16; j++)
{ {
Assert.False(containedHandles[j].Dirty); ClassicAssert.False(containedHandles[j].Dirty);
} }
_tracking.VirtualMemoryEvent((ulong)i * PageSize, 1, true); _tracking.VirtualMemoryEvent((ulong)i * PageSize, 1, true);
// Only the handle covering the entire range and the relevant contained handle are dirty. // Only the handle covering the entire range and the relevant contained handle are dirty.
Assert.True(allHandle.Dirty); ClassicAssert.True(allHandle.Dirty);
Assert.AreEqual(readTrackingTriggeredAll, ((ulong)i * PageSize, 1UL)); // Triggered read tracking ClassicAssert.AreEqual(readTrackingTriggeredAll, ((ulong)i * PageSize, 1UL)); // Triggered read tracking
for (int j = 0; j < 16; j++) for (int j = 0; j < 16; j++)
{ {
if (j == i) if (j == i)
{ {
Assert.True(containedHandles[j].Dirty); ClassicAssert.True(containedHandles[j].Dirty);
} }
else else
{ {
Assert.False(containedHandles[j].Dirty); ClassicAssert.False(containedHandles[j].Dirty);
} }
} }
@ -171,27 +172,27 @@ namespace Ryujinx.Tests.Memory
// Anywhere inside the pages the region is contained on should trigger. // Anywhere inside the pages the region is contained on should trigger.
bool originalRangeTriggers = TestSingleWrite(handle, address, size); bool originalRangeTriggers = TestSingleWrite(handle, address, size);
Assert.True(originalRangeTriggers); ClassicAssert.True(originalRangeTriggers);
bool alignedRangeTriggers = TestSingleWrite(handle, alignedStart, alignedSize); bool alignedRangeTriggers = TestSingleWrite(handle, alignedStart, alignedSize);
Assert.True(alignedRangeTriggers); ClassicAssert.True(alignedRangeTriggers);
bool alignedStartTriggers = TestSingleWrite(handle, alignedStart, 1); bool alignedStartTriggers = TestSingleWrite(handle, alignedStart, 1);
Assert.True(alignedStartTriggers); ClassicAssert.True(alignedStartTriggers);
bool alignedEndTriggers = TestSingleWrite(handle, alignedEnd - 1, 1); bool alignedEndTriggers = TestSingleWrite(handle, alignedEnd - 1, 1);
Assert.True(alignedEndTriggers); ClassicAssert.True(alignedEndTriggers);
// Outside the tracked range should not trigger. // Outside the tracked range should not trigger.
bool alignedBeforeTriggers = TestSingleWrite(handle, alignedStart - 1, 1); bool alignedBeforeTriggers = TestSingleWrite(handle, alignedStart - 1, 1);
Assert.False(alignedBeforeTriggers); ClassicAssert.False(alignedBeforeTriggers);
bool alignedAfterTriggers = TestSingleWrite(handle, alignedEnd, 1); bool alignedAfterTriggers = TestSingleWrite(handle, alignedEnd, 1);
Assert.False(alignedAfterTriggers); ClassicAssert.False(alignedAfterTriggers);
} }
[Test, Explicit, Timeout(1000)] [Test, Explicit, CancelAfter(1000)]
public void Multithreading() public void Multithreading()
{ {
// Multithreading sanity test // Multithreading sanity test
@ -287,9 +288,9 @@ namespace Ryujinx.Tests.Memory
thread.Join(); thread.Join();
} }
Assert.Greater(dirtyFlagReprotects, 10); ClassicAssert.Greater(dirtyFlagReprotects, 10);
Assert.Greater(writeTriggers, 10); ClassicAssert.Greater(writeTriggers, 10);
Assert.Greater(handleLifecycles, 10); ClassicAssert.Greater(handleLifecycles, 10);
} }
[Test] [Test]
@ -354,7 +355,7 @@ namespace Ryujinx.Tests.Memory
// The action should trigger exactly once for every registration, // The action should trigger exactly once for every registration,
// then we register once after all the threads signalling it cease. // then we register once after all the threads signalling it cease.
Assert.AreEqual(registeredCount, triggeredCount + 1); ClassicAssert.AreEqual(registeredCount, triggeredCount + 1);
} }
[Test] [Test]
@ -365,11 +366,11 @@ namespace Ryujinx.Tests.Memory
RegionHandle handle = _tracking.BeginTracking(0, PageSize, 0); RegionHandle handle = _tracking.BeginTracking(0, PageSize, 0);
handle.Reprotect(); handle.Reprotect();
Assert.AreEqual(1, _tracking.GetRegionCount()); ClassicAssert.AreEqual(1, _tracking.GetRegionCount());
handle.Dispose(); handle.Dispose();
Assert.AreEqual(0, _tracking.GetRegionCount()); ClassicAssert.AreEqual(0, _tracking.GetRegionCount());
// Two handles, small entirely contains big. // Two handles, small entirely contains big.
// We expect there to be three regions after creating both, one for the small region and two covering the big one around it. // We expect there to be three regions after creating both, one for the small region and two covering the big one around it.
@ -378,16 +379,16 @@ namespace Ryujinx.Tests.Memory
RegionHandle handleSmall = _tracking.BeginTracking(PageSize, PageSize, 0); RegionHandle handleSmall = _tracking.BeginTracking(PageSize, PageSize, 0);
RegionHandle handleBig = _tracking.BeginTracking(0, PageSize * 4, 0); RegionHandle handleBig = _tracking.BeginTracking(0, PageSize * 4, 0);
Assert.AreEqual(3, _tracking.GetRegionCount()); ClassicAssert.AreEqual(3, _tracking.GetRegionCount());
// After disposing the big region, only the small one will remain. // After disposing the big region, only the small one will remain.
handleBig.Dispose(); handleBig.Dispose();
Assert.AreEqual(1, _tracking.GetRegionCount()); ClassicAssert.AreEqual(1, _tracking.GetRegionCount());
handleSmall.Dispose(); handleSmall.Dispose();
Assert.AreEqual(0, _tracking.GetRegionCount()); ClassicAssert.AreEqual(0, _tracking.GetRegionCount());
} }
[Test] [Test]
@ -397,22 +398,22 @@ namespace Ryujinx.Tests.Memory
_memoryManager.OnProtect += (va, size, newProtection) => _memoryManager.OnProtect += (va, size, newProtection) =>
{ {
Assert.AreEqual((0, PageSize), (va, size)); // Should protect the exact region all the operations use. ClassicAssert.AreEqual((0, PageSize), (va, size)); // Should protect the exact region all the operations use.
protection = newProtection; protection = newProtection;
}; };
RegionHandle handle = _tracking.BeginTracking(0, PageSize, 0); RegionHandle handle = _tracking.BeginTracking(0, PageSize, 0);
// After creating the handle, there is no protection yet. // After creating the handle, there is no protection yet.
Assert.AreEqual(MemoryPermission.ReadAndWrite, protection); ClassicAssert.AreEqual(MemoryPermission.ReadAndWrite, protection);
bool dirtyInitial = handle.Dirty; bool dirtyInitial = handle.Dirty;
Assert.True(dirtyInitial); // Handle starts dirty. ClassicAssert.True(dirtyInitial); // Handle starts dirty.
handle.Reprotect(); handle.Reprotect();
// After a reprotect, there is write protection, which will set a dirty flag when any write happens. // After a reprotect, there is write protection, which will set a dirty flag when any write happens.
Assert.AreEqual(MemoryPermission.Read, protection); ClassicAssert.AreEqual(MemoryPermission.Read, protection);
(ulong address, ulong size)? readTrackingTriggered = null; (ulong address, ulong size)? readTrackingTriggered = null;
handle.RegisterAction((address, size) => handle.RegisterAction((address, size) =>
@ -421,21 +422,21 @@ namespace Ryujinx.Tests.Memory
}); });
// Registering an action adds read/write protection. // Registering an action adds read/write protection.
Assert.AreEqual(MemoryPermission.None, protection); ClassicAssert.AreEqual(MemoryPermission.None, protection);
bool dirtyAfterReprotect = handle.Dirty; bool dirtyAfterReprotect = handle.Dirty;
Assert.False(dirtyAfterReprotect); // Handle is no longer dirty. ClassicAssert.False(dirtyAfterReprotect); // Handle is no longer dirty.
// First we should read, which will trigger the action. This _should not_ remove write protection on the memory. // First we should read, which will trigger the action. This _should not_ remove write protection on the memory.
_tracking.VirtualMemoryEvent(0, 4, false); _tracking.VirtualMemoryEvent(0, 4, false);
bool dirtyAfterRead = handle.Dirty; bool dirtyAfterRead = handle.Dirty;
Assert.False(dirtyAfterRead); // Not dirtied, as this was a read. ClassicAssert.False(dirtyAfterRead); // Not dirtied, as this was a read.
Assert.AreEqual(readTrackingTriggered, (0UL, 4UL)); // Read action was triggered. ClassicAssert.AreEqual(readTrackingTriggered, (0UL, 4UL)); // Read action was triggered.
Assert.AreEqual(MemoryPermission.Read, protection); // Write protection is still present. ClassicAssert.AreEqual(MemoryPermission.Read, protection); // Write protection is still present.
readTrackingTriggered = null; readTrackingTriggered = null;
@ -444,11 +445,11 @@ namespace Ryujinx.Tests.Memory
_tracking.VirtualMemoryEvent(0, 4, true); _tracking.VirtualMemoryEvent(0, 4, true);
bool dirtyAfterWriteAfterRead = handle.Dirty; bool dirtyAfterWriteAfterRead = handle.Dirty;
Assert.True(dirtyAfterWriteAfterRead); // Should be dirty. ClassicAssert.True(dirtyAfterWriteAfterRead); // Should be dirty.
Assert.AreEqual(MemoryPermission.ReadAndWrite, protection); // All protection is now be removed from the memory. ClassicAssert.AreEqual(MemoryPermission.ReadAndWrite, protection); // All protection is now be removed from the memory.
Assert.IsNull(readTrackingTriggered); // Read tracking was removed when the action fired, as it can only fire once. ClassicAssert.IsNull(readTrackingTriggered); // Read tracking was removed when the action fired, as it can only fire once.
handle.Dispose(); handle.Dispose();
} }
@ -476,22 +477,22 @@ namespace Ryujinx.Tests.Memory
_tracking.VirtualMemoryEvent(0, 4, false, precise: true); _tracking.VirtualMemoryEvent(0, 4, false, precise: true);
Assert.IsNull(readTrackingTriggered); // Hasn't been triggered - precise action returned true. ClassicAssert.IsNull(readTrackingTriggered); // Hasn't been triggered - precise action returned true.
Assert.AreEqual(preciseTriggered, (0UL, 4UL, false)); // Precise action was triggered. ClassicAssert.AreEqual(preciseTriggered, (0UL, 4UL, false)); // Precise action was triggered.
_tracking.VirtualMemoryEvent(0, 4, true, precise: true); _tracking.VirtualMemoryEvent(0, 4, true, precise: true);
Assert.IsNull(readTrackingTriggered); // Still hasn't been triggered. ClassicAssert.IsNull(readTrackingTriggered); // Still hasn't been triggered.
bool dirtyAfterPreciseActionTrue = handle.Dirty; bool dirtyAfterPreciseActionTrue = handle.Dirty;
Assert.False(dirtyAfterPreciseActionTrue); // Not dirtied - precise action returned true. ClassicAssert.False(dirtyAfterPreciseActionTrue); // Not dirtied - precise action returned true.
Assert.AreEqual(preciseTriggered, (0UL, 4UL, true)); // Precise action was triggered. ClassicAssert.AreEqual(preciseTriggered, (0UL, 4UL, true)); // Precise action was triggered.
// Handle is now dirty. // Handle is now dirty.
handle.Reprotect(true); handle.Reprotect(true);
preciseTriggered = null; preciseTriggered = null;
_tracking.VirtualMemoryEvent(4, 4, true, precise: true); _tracking.VirtualMemoryEvent(4, 4, true, precise: true);
Assert.AreEqual(preciseTriggered, (4UL, 4UL, true)); // Precise action was triggered even though handle was dirty. ClassicAssert.AreEqual(preciseTriggered, (4UL, 4UL, true)); // Precise action was triggered even though handle was dirty.
handle.Reprotect(); handle.Reprotect();
handle.RegisterPreciseAction((address, size, write) => handle.RegisterPreciseAction((address, size, write) =>
@ -503,10 +504,10 @@ namespace Ryujinx.Tests.Memory
_tracking.VirtualMemoryEvent(8, 4, true, precise: true); _tracking.VirtualMemoryEvent(8, 4, true, precise: true);
Assert.AreEqual(readTrackingTriggered, (8UL, 4UL)); // Read action triggered, as precise action returned false. ClassicAssert.AreEqual(readTrackingTriggered, (8UL, 4UL)); // Read action triggered, as precise action returned false.
bool dirtyAfterPreciseActionFalse = handle.Dirty; bool dirtyAfterPreciseActionFalse = handle.Dirty;
Assert.True(dirtyAfterPreciseActionFalse); // Dirtied, as precise action returned false. ClassicAssert.True(dirtyAfterPreciseActionFalse); // Dirtied, as precise action returned false.
Assert.AreEqual(preciseTriggered, (8UL, 4UL, true)); // Precise action was triggered. ClassicAssert.AreEqual(preciseTriggered, (8UL, 4UL, true)); // Precise action was triggered.
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter; using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x34, Unsafe.SizeOf<AudioRendererConfiguration>()); ClassicAssert.AreEqual(0x34, Unsafe.SizeOf<AudioRendererConfiguration>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Common; using Ryujinx.Audio.Renderer.Common;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,8 +10,8 @@ namespace Ryujinx.Tests.Audio.Renderer
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x10, Unsafe.SizeOf<BehaviourParameter>()); ClassicAssert.AreEqual(0x10, Unsafe.SizeOf<BehaviourParameter>());
Assert.AreEqual(0x10, Unsafe.SizeOf<BehaviourParameter.ErrorInfo>()); ClassicAssert.AreEqual(0x10, Unsafe.SizeOf<BehaviourParameter.ErrorInfo>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter; using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,8 +10,8 @@ namespace Ryujinx.Tests.Audio.Renderer
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0xC, Unsafe.SizeOf<BiquadFilterParameter1>()); ClassicAssert.AreEqual(0xC, Unsafe.SizeOf<BiquadFilterParameter1>());
Assert.AreEqual(0x18, Unsafe.SizeOf<BiquadFilterParameter2>()); ClassicAssert.AreEqual(0x18, Unsafe.SizeOf<BiquadFilterParameter2>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Common; using Ryujinx.Audio.Renderer.Common;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Common
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x40, Unsafe.SizeOf<UpdateDataHeader>()); ClassicAssert.AreEqual(0x40, Unsafe.SizeOf<UpdateDataHeader>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Common; using Ryujinx.Audio.Renderer.Common;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Common
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.LessOrEqual(Unsafe.SizeOf<VoiceState>(), 0x100); ClassicAssert.LessOrEqual(Unsafe.SizeOf<VoiceState>(), 0x100);
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Common; using Ryujinx.Audio.Renderer.Common;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Common
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x30, Unsafe.SizeOf<WaveBuffer>()); ClassicAssert.AreEqual(0x30, Unsafe.SizeOf<WaveBuffer>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Dsp; using Ryujinx.Audio.Renderer.Dsp;
using Ryujinx.Audio.Renderer.Parameter; using Ryujinx.Audio.Renderer.Parameter;
using System; using System;
@ -74,13 +75,13 @@ namespace Ryujinx.Tests.Audio.Renderer.Dsp
float thisDelta = Math.Abs(expectedOutput[sample] - outputBuffer[sample]); float thisDelta = Math.Abs(expectedOutput[sample] - outputBuffer[sample]);
// Ensure no discontinuities // Ensure no discontinuities
Assert.IsTrue(thisDelta < 0.1f); ClassicAssert.IsTrue(thisDelta < 0.1f);
sumDifference += thisDelta; sumDifference += thisDelta;
} }
sumDifference /= outputSampleCount; sumDifference /= outputSampleCount;
// Expect the output to be 99% similar to the expected resampled sine wave // Expect the output to be 99% similar to the expected resampled sine wave
Assert.IsTrue(sumDifference < 0.01f); ClassicAssert.IsTrue(sumDifference < 0.01f);
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Dsp; using Ryujinx.Audio.Renderer.Dsp;
using Ryujinx.Audio.Renderer.Server.Upsampler; using Ryujinx.Audio.Renderer.Server.Upsampler;
using System; using System;
@ -51,7 +52,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Dsp
sumDifference /= expectedOutput.Length; sumDifference /= expectedOutput.Length;
// Expect the output to be 98% similar to the expected resampled sine wave // Expect the output to be 98% similar to the expected resampled sine wave
Assert.IsTrue(sumDifference < 0.02f); ClassicAssert.IsTrue(sumDifference < 0.02f);
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter; using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,8 +10,8 @@ namespace Ryujinx.Tests.Audio.Renderer
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0xC0, Unsafe.SizeOf<EffectInParameterVersion1>()); ClassicAssert.AreEqual(0xC0, Unsafe.SizeOf<EffectInParameterVersion1>());
Assert.AreEqual(0xC0, Unsafe.SizeOf<EffectInParameterVersion2>()); ClassicAssert.AreEqual(0xC0, Unsafe.SizeOf<EffectInParameterVersion2>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter; using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,8 +10,8 @@ namespace Ryujinx.Tests.Audio.Renderer
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x10, Unsafe.SizeOf<EffectOutStatusVersion1>()); ClassicAssert.AreEqual(0x10, Unsafe.SizeOf<EffectOutStatusVersion1>());
Assert.AreEqual(0x90, Unsafe.SizeOf<EffectOutStatusVersion2>()); ClassicAssert.AreEqual(0x90, Unsafe.SizeOf<EffectOutStatusVersion2>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter; using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,8 +10,8 @@ namespace Ryujinx.Tests.Audio.Renderer
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x20, Unsafe.SizeOf<MemoryPoolInParameter>()); ClassicAssert.AreEqual(0x20, Unsafe.SizeOf<MemoryPoolInParameter>());
Assert.AreEqual(0x10, Unsafe.SizeOf<MemoryPoolOutStatus>()); ClassicAssert.AreEqual(0x10, Unsafe.SizeOf<MemoryPoolOutStatus>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter; using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0xB0, Unsafe.SizeOf<BehaviourErrorInfoOutStatus>()); ClassicAssert.AreEqual(0xB0, Unsafe.SizeOf<BehaviourErrorInfoOutStatus>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Effect; using Ryujinx.Audio.Renderer.Parameter.Effect;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x6C, Unsafe.SizeOf<AuxiliaryBufferParameter>()); ClassicAssert.AreEqual(0x6C, Unsafe.SizeOf<AuxiliaryBufferParameter>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Effect; using Ryujinx.Audio.Renderer.Parameter.Effect;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,8 +10,8 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x18, Unsafe.SizeOf<BiquadFilterEffectParameter1>()); ClassicAssert.AreEqual(0x18, Unsafe.SizeOf<BiquadFilterEffectParameter1>());
Assert.AreEqual(0x24, Unsafe.SizeOf<BiquadFilterEffectParameter2>()); ClassicAssert.AreEqual(0x24, Unsafe.SizeOf<BiquadFilterEffectParameter2>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Effect; using Ryujinx.Audio.Renderer.Parameter.Effect;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x94, Unsafe.SizeOf<BufferMixParameter>()); ClassicAssert.AreEqual(0x94, Unsafe.SizeOf<BufferMixParameter>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Effect; using Ryujinx.Audio.Renderer.Parameter.Effect;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x38, Unsafe.SizeOf<CompressorParameter>()); ClassicAssert.AreEqual(0x38, Unsafe.SizeOf<CompressorParameter>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Effect; using Ryujinx.Audio.Renderer.Parameter.Effect;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x35, Unsafe.SizeOf<DelayParameter>()); ClassicAssert.AreEqual(0x35, Unsafe.SizeOf<DelayParameter>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Effect; using Ryujinx.Audio.Renderer.Parameter.Effect;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x44, Unsafe.SizeOf<LimiterParameter>()); ClassicAssert.AreEqual(0x44, Unsafe.SizeOf<LimiterParameter>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Effect; using Ryujinx.Audio.Renderer.Parameter.Effect;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x30, Unsafe.SizeOf<LimiterStatistics>()); ClassicAssert.AreEqual(0x30, Unsafe.SizeOf<LimiterStatistics>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Effect; using Ryujinx.Audio.Renderer.Parameter.Effect;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x49, Unsafe.SizeOf<Reverb3dParameter>()); ClassicAssert.AreEqual(0x49, Unsafe.SizeOf<Reverb3dParameter>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Effect; using Ryujinx.Audio.Renderer.Parameter.Effect;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Effect
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x41, Unsafe.SizeOf<ReverbParameter>()); ClassicAssert.AreEqual(0x41, Unsafe.SizeOf<ReverbParameter>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter; using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x20, Unsafe.SizeOf<MixInParameterDirtyOnlyUpdate>()); ClassicAssert.AreEqual(0x20, Unsafe.SizeOf<MixInParameterDirtyOnlyUpdate>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter; using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x930, Unsafe.SizeOf<MixParameter>()); ClassicAssert.AreEqual(0x930, Unsafe.SizeOf<MixParameter>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Performance; using Ryujinx.Audio.Renderer.Parameter.Performance;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x10, Unsafe.SizeOf<PerformanceInParameter>()); ClassicAssert.AreEqual(0x10, Unsafe.SizeOf<PerformanceInParameter>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Performance; using Ryujinx.Audio.Renderer.Parameter.Performance;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x10, Unsafe.SizeOf<PerformanceOutStatus>()); ClassicAssert.AreEqual(0x10, Unsafe.SizeOf<PerformanceOutStatus>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter; using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x10, Unsafe.SizeOf<RendererInfoOutStatus>()); ClassicAssert.AreEqual(0x10, Unsafe.SizeOf<RendererInfoOutStatus>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Sink; using Ryujinx.Audio.Renderer.Parameter.Sink;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Sink
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x24, Unsafe.SizeOf<CircularBufferParameter>()); ClassicAssert.AreEqual(0x24, Unsafe.SizeOf<CircularBufferParameter>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter.Sink; using Ryujinx.Audio.Renderer.Parameter.Sink;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter.Sink
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x11C, Unsafe.SizeOf<DeviceParameter>()); ClassicAssert.AreEqual(0x11C, Unsafe.SizeOf<DeviceParameter>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter; using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x140, Unsafe.SizeOf<SinkInParameter>()); ClassicAssert.AreEqual(0x140, Unsafe.SizeOf<SinkInParameter>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter; using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x20, Unsafe.SizeOf<SinkOutStatus>()); ClassicAssert.AreEqual(0x20, Unsafe.SizeOf<SinkOutStatus>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter; using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Parameter
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x20, Unsafe.SizeOf<SplitterInParameterHeader>()); ClassicAssert.AreEqual(0x20, Unsafe.SizeOf<SplitterInParameterHeader>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Server.MemoryPool; using Ryujinx.Audio.Renderer.Server.MemoryPool;
using System; using System;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -10,7 +11,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x20, Unsafe.SizeOf<AddressInfo>()); ClassicAssert.AreEqual(0x20, Unsafe.SizeOf<AddressInfo>());
} }
[Test] [Test]
@ -25,11 +26,11 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
addressInfo.ForceMappedDspAddress = 0x2000000; addressInfo.ForceMappedDspAddress = 0x2000000;
Assert.AreEqual(0x2000000, addressInfo.GetReference(true)); ClassicAssert.AreEqual(0x2000000, addressInfo.GetReference(true));
addressInfo.SetupMemoryPool(memoryPoolState.AsSpan()); addressInfo.SetupMemoryPool(memoryPoolState.AsSpan());
Assert.AreEqual(0x4000000, addressInfo.GetReference(true)); ClassicAssert.AreEqual(0x4000000, addressInfo.GetReference(true));
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Server; using Ryujinx.Audio.Renderer.Server;
namespace Ryujinx.Tests.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 previousRevision = BehaviourInfo.BaseRevisionMagic + (BehaviourInfo.LastRevision - 1);
int invalidRevision = BehaviourInfo.BaseRevisionMagic + (BehaviourInfo.LastRevision + 1); int invalidRevision = BehaviourInfo.BaseRevisionMagic + (BehaviourInfo.LastRevision + 1);
Assert.IsTrue(BehaviourInfo.CheckFeatureSupported(latestRevision, latestRevision)); ClassicAssert.IsTrue(BehaviourInfo.CheckFeatureSupported(latestRevision, latestRevision));
Assert.IsFalse(BehaviourInfo.CheckFeatureSupported(previousRevision, latestRevision)); ClassicAssert.IsFalse(BehaviourInfo.CheckFeatureSupported(previousRevision, latestRevision));
Assert.IsTrue(BehaviourInfo.CheckFeatureSupported(latestRevision, previousRevision)); 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.. // 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] [Test]
@ -26,11 +27,11 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision1); behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision1);
Assert.IsFalse(behaviourInfo.IsMemoryPoolForceMappingEnabled()); ClassicAssert.IsFalse(behaviourInfo.IsMemoryPoolForceMappingEnabled());
behaviourInfo.UpdateFlags(0x1); behaviourInfo.UpdateFlags(0x1);
Assert.IsTrue(behaviourInfo.IsMemoryPoolForceMappingEnabled()); ClassicAssert.IsTrue(behaviourInfo.IsMemoryPoolForceMappingEnabled());
} }
[Test] [Test]
@ -40,26 +41,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision1); behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision1);
Assert.IsFalse(behaviourInfo.IsAdpcmLoopContextBugFixed()); ClassicAssert.IsFalse(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsFalse(behaviourInfo.IsSplitterSupported()); ClassicAssert.IsFalse(behaviourInfo.IsSplitterSupported());
Assert.IsFalse(behaviourInfo.IsLongSizePreDelaySupported()); ClassicAssert.IsFalse(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsFalse(behaviourInfo.IsAudioUsbDeviceOutputSupported()); ClassicAssert.IsFalse(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported()); ClassicAssert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsFalse(behaviourInfo.IsSplitterBugFixed()); ClassicAssert.IsFalse(behaviourInfo.IsSplitterBugFixed());
Assert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported()); ClassicAssert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported()); ClassicAssert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed()); ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported()); ClassicAssert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported()); ClassicAssert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported()); ClassicAssert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing()); ClassicAssert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported()); ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled()); ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported()); ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.70f, behaviourInfo.GetAudioRendererProcessingTimeLimit()); ClassicAssert.AreEqual(0.70f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion()); ClassicAssert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat()); ClassicAssert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat());
} }
[Test] [Test]
@ -69,26 +70,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision2); behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision2);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsFalse(behaviourInfo.IsLongSizePreDelaySupported()); ClassicAssert.IsFalse(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsFalse(behaviourInfo.IsAudioUsbDeviceOutputSupported()); ClassicAssert.IsFalse(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported()); ClassicAssert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsFalse(behaviourInfo.IsSplitterBugFixed()); ClassicAssert.IsFalse(behaviourInfo.IsSplitterBugFixed());
Assert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported()); ClassicAssert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported()); ClassicAssert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed()); ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported()); ClassicAssert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported()); ClassicAssert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported()); ClassicAssert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing()); ClassicAssert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported()); ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled()); ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported()); ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.70f, behaviourInfo.GetAudioRendererProcessingTimeLimit()); ClassicAssert.AreEqual(0.70f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion()); ClassicAssert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat()); ClassicAssert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat());
} }
[Test] [Test]
@ -98,26 +99,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision3); behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision3);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported()); ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsFalse(behaviourInfo.IsAudioUsbDeviceOutputSupported()); ClassicAssert.IsFalse(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported()); ClassicAssert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsFalse(behaviourInfo.IsSplitterBugFixed()); ClassicAssert.IsFalse(behaviourInfo.IsSplitterBugFixed());
Assert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported()); ClassicAssert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported()); ClassicAssert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed()); ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported()); ClassicAssert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported()); ClassicAssert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported()); ClassicAssert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing()); ClassicAssert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported()); ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled()); ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported()); ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.70f, behaviourInfo.GetAudioRendererProcessingTimeLimit()); ClassicAssert.AreEqual(0.70f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion()); ClassicAssert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat()); ClassicAssert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat());
} }
[Test] [Test]
@ -127,26 +128,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision4); behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision4);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported()); ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported()); ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported()); ClassicAssert.IsFalse(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsFalse(behaviourInfo.IsSplitterBugFixed()); ClassicAssert.IsFalse(behaviourInfo.IsSplitterBugFixed());
Assert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported()); ClassicAssert.IsFalse(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported()); ClassicAssert.IsFalse(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed()); ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported()); ClassicAssert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported()); ClassicAssert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported()); ClassicAssert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing()); ClassicAssert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported()); ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled()); ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported()); ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.75f, behaviourInfo.GetAudioRendererProcessingTimeLimit()); ClassicAssert.AreEqual(0.75f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion()); ClassicAssert.AreEqual(1, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat()); ClassicAssert.AreEqual(1, behaviourInfo.GetPerformanceMetricsDataFormat());
} }
[Test] [Test]
@ -156,26 +157,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision5); behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision5);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported()); ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported()); ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported()); ClassicAssert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterBugFixed());
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported()); ClassicAssert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported()); ClassicAssert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed()); ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported()); ClassicAssert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported()); ClassicAssert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported()); ClassicAssert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing()); ClassicAssert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported()); ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled()); ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported()); ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit()); ClassicAssert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(2, behaviourInfo.GetCommandProcessingTimeEstimatorVersion()); ClassicAssert.AreEqual(2, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat()); ClassicAssert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
} }
[Test] [Test]
@ -185,26 +186,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision6); behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision6);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported()); ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported()); ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported()); ClassicAssert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterBugFixed());
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported()); ClassicAssert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported()); ClassicAssert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported()); ClassicAssert.IsFalse(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported()); ClassicAssert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported()); ClassicAssert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing()); ClassicAssert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported()); ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled()); ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported()); ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit()); ClassicAssert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(2, behaviourInfo.GetCommandProcessingTimeEstimatorVersion()); ClassicAssert.AreEqual(2, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat()); ClassicAssert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
} }
[Test] [Test]
@ -214,26 +215,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision7); behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision7);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported()); ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported()); ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported()); ClassicAssert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterBugFixed());
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported()); ClassicAssert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported()); ClassicAssert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported()); ClassicAssert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported()); ClassicAssert.IsFalse(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported()); ClassicAssert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing()); ClassicAssert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported()); ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled()); ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported()); ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit()); ClassicAssert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(2, behaviourInfo.GetCommandProcessingTimeEstimatorVersion()); ClassicAssert.AreEqual(2, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat()); ClassicAssert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
} }
[Test] [Test]
@ -243,26 +244,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision8); behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision8);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported()); ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported()); ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported()); ClassicAssert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterBugFixed());
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported()); ClassicAssert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported()); ClassicAssert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported()); ClassicAssert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported()); ClassicAssert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported()); ClassicAssert.IsFalse(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing()); ClassicAssert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported()); ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled()); ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported()); ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit()); ClassicAssert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(3, behaviourInfo.GetCommandProcessingTimeEstimatorVersion()); ClassicAssert.AreEqual(3, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat()); ClassicAssert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
} }
[Test] [Test]
@ -272,26 +273,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision9); behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision9);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported()); ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported()); ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported()); ClassicAssert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterBugFixed());
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported()); ClassicAssert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported()); ClassicAssert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported()); ClassicAssert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported()); ClassicAssert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported()); ClassicAssert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing()); ClassicAssert.IsFalse(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported()); ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled()); ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported()); ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit()); ClassicAssert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(3, behaviourInfo.GetCommandProcessingTimeEstimatorVersion()); ClassicAssert.AreEqual(3, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat()); ClassicAssert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
} }
[Test] [Test]
@ -301,26 +302,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision10); behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision10);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported()); ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported()); ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported()); ClassicAssert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterBugFixed());
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported()); ClassicAssert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported()); ClassicAssert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported()); ClassicAssert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported()); ClassicAssert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported()); ClassicAssert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing()); ClassicAssert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported()); ClassicAssert.IsFalse(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled()); ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported()); ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit()); ClassicAssert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(4, behaviourInfo.GetCommandProcessingTimeEstimatorVersion()); ClassicAssert.AreEqual(4, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat()); ClassicAssert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
} }
[Test] [Test]
@ -330,26 +331,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision11); behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision11);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported()); ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported()); ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported()); ClassicAssert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterBugFixed());
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported()); ClassicAssert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported()); ClassicAssert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported()); ClassicAssert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported()); ClassicAssert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported()); ClassicAssert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing()); ClassicAssert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsTrue(behaviourInfo.IsNewEffectChannelMappingSupported()); ClassicAssert.IsTrue(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled()); ClassicAssert.IsFalse(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported()); ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit()); ClassicAssert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(5, behaviourInfo.GetCommandProcessingTimeEstimatorVersion()); ClassicAssert.AreEqual(5, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat()); ClassicAssert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
} }
[Test] [Test]
@ -359,26 +360,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision12); behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision12);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported()); ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported()); ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported()); ClassicAssert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterBugFixed());
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported()); ClassicAssert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported()); ClassicAssert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported()); ClassicAssert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported()); ClassicAssert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported()); ClassicAssert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing()); ClassicAssert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsTrue(behaviourInfo.IsNewEffectChannelMappingSupported()); ClassicAssert.IsTrue(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled()); ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported()); ClassicAssert.IsFalse(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit()); ClassicAssert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(5, behaviourInfo.GetCommandProcessingTimeEstimatorVersion()); ClassicAssert.AreEqual(5, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat()); ClassicAssert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
} }
[Test] [Test]
@ -388,26 +389,26 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision13); behaviourInfo.SetUserRevision(BehaviourInfo.BaseRevisionMagic + BehaviourInfo.Revision13);
Assert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsAdpcmLoopContextBugFixed());
Assert.IsTrue(behaviourInfo.IsSplitterSupported()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterSupported());
Assert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported()); ClassicAssert.IsTrue(behaviourInfo.IsLongSizePreDelaySupported());
Assert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported()); ClassicAssert.IsTrue(behaviourInfo.IsAudioUsbDeviceOutputSupported());
Assert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported()); ClassicAssert.IsTrue(behaviourInfo.IsFlushVoiceWaveBuffersSupported());
Assert.IsTrue(behaviourInfo.IsSplitterBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterBugFixed());
Assert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported()); ClassicAssert.IsTrue(behaviourInfo.IsElapsedFrameCountSupported());
Assert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported()); ClassicAssert.IsTrue(behaviourInfo.IsDecodingBehaviourFlagSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed()); ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterEffectStateClearBugFixed());
Assert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported()); ClassicAssert.IsTrue(behaviourInfo.IsMixInParameterDirtyOnlyUpdateSupported());
Assert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported()); ClassicAssert.IsTrue(behaviourInfo.IsWaveBufferVersion2Supported());
Assert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported()); ClassicAssert.IsTrue(behaviourInfo.IsEffectInfoVersion2Supported());
Assert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing()); ClassicAssert.IsTrue(behaviourInfo.UseMultiTapBiquadFilterProcessing());
Assert.IsTrue(behaviourInfo.IsNewEffectChannelMappingSupported()); ClassicAssert.IsTrue(behaviourInfo.IsNewEffectChannelMappingSupported());
Assert.IsTrue(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled()); ClassicAssert.IsTrue(behaviourInfo.IsBiquadFilterParameterForSplitterEnabled());
Assert.IsTrue(behaviourInfo.IsSplitterPrevVolumeResetSupported()); ClassicAssert.IsTrue(behaviourInfo.IsSplitterPrevVolumeResetSupported());
Assert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit()); ClassicAssert.AreEqual(0.80f, behaviourInfo.GetAudioRendererProcessingTimeLimit());
Assert.AreEqual(5, behaviourInfo.GetCommandProcessingTimeEstimatorVersion()); ClassicAssert.AreEqual(5, behaviourInfo.GetCommandProcessingTimeEstimatorVersion());
Assert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat()); ClassicAssert.AreEqual(2, behaviourInfo.GetPerformanceMetricsDataFormat());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Server.MemoryPool; using Ryujinx.Audio.Renderer.Server.MemoryPool;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(Unsafe.SizeOf<MemoryPoolInfo>(), 0x20); ClassicAssert.AreEqual(Unsafe.SizeOf<MemoryPoolInfo>(), 0x20);
} }
[Test] [Test]
@ -21,12 +22,12 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
memoryPool.DspAddress = 0x2000000; memoryPool.DspAddress = 0x2000000;
Assert.IsTrue(memoryPool.Contains(0x1000000, 0x10)); ClassicAssert.IsTrue(memoryPool.Contains(0x1000000, 0x10));
Assert.IsTrue(memoryPool.Contains(0x1000FE0, 0x10)); ClassicAssert.IsTrue(memoryPool.Contains(0x1000FE0, 0x10));
Assert.IsTrue(memoryPool.Contains(0x1000FFF, 0x1)); ClassicAssert.IsTrue(memoryPool.Contains(0x1000FFF, 0x1));
Assert.IsFalse(memoryPool.Contains(0x1000FFF, 0x2)); ClassicAssert.IsFalse(memoryPool.Contains(0x1000FFF, 0x2));
Assert.IsFalse(memoryPool.Contains(0x1001000, 0x10)); ClassicAssert.IsFalse(memoryPool.Contains(0x1001000, 0x10));
Assert.IsFalse(memoryPool.Contains(0x2000000, 0x10)); ClassicAssert.IsFalse(memoryPool.Contains(0x2000000, 0x10));
} }
[Test] [Test]
@ -38,11 +39,11 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
memoryPool.DspAddress = 0x2000000; memoryPool.DspAddress = 0x2000000;
Assert.AreEqual(0x2000FE0, memoryPool.Translate(0x1000FE0, 0x10)); ClassicAssert.AreEqual(0x2000FE0, memoryPool.Translate(0x1000FE0, 0x10));
Assert.AreEqual(0x2000FFF, memoryPool.Translate(0x1000FFF, 0x1)); ClassicAssert.AreEqual(0x2000FFF, memoryPool.Translate(0x1000FFF, 0x1));
Assert.AreEqual(0x0, memoryPool.Translate(0x1000FFF, 0x2)); ClassicAssert.AreEqual(0x0, memoryPool.Translate(0x1000FFF, 0x2));
Assert.AreEqual(0x0, memoryPool.Translate(0x1001000, 0x10)); ClassicAssert.AreEqual(0x0, memoryPool.Translate(0x1001000, 0x10));
Assert.AreEqual(0x0, memoryPool.Translate(0x2000000, 0x10)); ClassicAssert.AreEqual(0x0, memoryPool.Translate(0x2000000, 0x10));
} }
[Test] [Test]
@ -52,11 +53,11 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
memoryPool.SetCpuAddress(0x1000000, 0x1000); memoryPool.SetCpuAddress(0x1000000, 0x1000);
Assert.IsFalse(memoryPool.IsMapped()); ClassicAssert.IsFalse(memoryPool.IsMapped());
memoryPool.DspAddress = 0x2000000; memoryPool.DspAddress = 0x2000000;
Assert.IsTrue(memoryPool.IsMapped()); ClassicAssert.IsTrue(memoryPool.IsMapped());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Server.Mix; using Ryujinx.Audio.Renderer.Server.Mix;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x940, Unsafe.SizeOf<MixInfo>()); ClassicAssert.AreEqual(0x940, Unsafe.SizeOf<MixInfo>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio; using Ryujinx.Audio;
using Ryujinx.Audio.Renderer.Server.MemoryPool; using Ryujinx.Audio.Renderer.Server.MemoryPool;
using System; using System;
@ -23,12 +24,12 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
const DspAddress DspAddress = CpuAddress; // TODO: DSP LLE const DspAddress DspAddress = CpuAddress; // TODO: DSP LLE
const ulong CpuSize = 0x1000; const ulong CpuSize = 0x1000;
Assert.IsFalse(poolMapper.InitializeSystemPool(ref memoryPoolCpu, CpuAddress, CpuSize)); ClassicAssert.IsFalse(poolMapper.InitializeSystemPool(ref memoryPoolCpu, CpuAddress, CpuSize));
Assert.IsTrue(poolMapper.InitializeSystemPool(ref memoryPoolDsp, CpuAddress, CpuSize)); ClassicAssert.IsTrue(poolMapper.InitializeSystemPool(ref memoryPoolDsp, CpuAddress, CpuSize));
Assert.AreEqual(CpuAddress, memoryPoolDsp.CpuAddress); ClassicAssert.AreEqual(CpuAddress, memoryPoolDsp.CpuAddress);
Assert.AreEqual(CpuSize, memoryPoolDsp.Size); ClassicAssert.AreEqual(CpuSize, memoryPoolDsp.Size);
Assert.AreEqual(DspAddress, memoryPoolDsp.DspAddress); ClassicAssert.AreEqual(DspAddress, memoryPoolDsp.DspAddress);
} }
[Test] [Test]
@ -38,8 +39,8 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
MemoryPoolInfo memoryPoolDsp = MemoryPoolInfo.Create(MemoryPoolInfo.LocationType.Dsp); MemoryPoolInfo memoryPoolDsp = MemoryPoolInfo.Create(MemoryPoolInfo.LocationType.Dsp);
MemoryPoolInfo memoryPoolCpu = MemoryPoolInfo.Create(MemoryPoolInfo.LocationType.Cpu); MemoryPoolInfo memoryPoolCpu = MemoryPoolInfo.Create(MemoryPoolInfo.LocationType.Cpu);
Assert.AreEqual(0xFFFF8001, poolMapper.GetProcessHandle(ref memoryPoolCpu)); ClassicAssert.AreEqual(0xFFFF8001, poolMapper.GetProcessHandle(ref memoryPoolCpu));
Assert.AreEqual(DummyProcessHandle, poolMapper.GetProcessHandle(ref memoryPoolDsp)); ClassicAssert.AreEqual(DummyProcessHandle, poolMapper.GetProcessHandle(ref memoryPoolDsp));
} }
[Test] [Test]
@ -56,15 +57,15 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
memoryPoolDsp.SetCpuAddress(CpuAddress, CpuSize); memoryPoolDsp.SetCpuAddress(CpuAddress, CpuSize);
memoryPoolCpu.SetCpuAddress(CpuAddress, CpuSize); memoryPoolCpu.SetCpuAddress(CpuAddress, CpuSize);
Assert.AreEqual(DspAddress, poolMapper.Map(ref memoryPoolCpu)); ClassicAssert.AreEqual(DspAddress, poolMapper.Map(ref memoryPoolCpu));
Assert.AreEqual(DspAddress, poolMapper.Map(ref memoryPoolDsp)); ClassicAssert.AreEqual(DspAddress, poolMapper.Map(ref memoryPoolDsp));
Assert.AreEqual(DspAddress, memoryPoolDsp.DspAddress); ClassicAssert.AreEqual(DspAddress, memoryPoolDsp.DspAddress);
Assert.IsTrue(poolMapper.Unmap(ref memoryPoolCpu)); ClassicAssert.IsTrue(poolMapper.Unmap(ref memoryPoolCpu));
memoryPoolDsp.IsUsed = true; memoryPoolDsp.IsUsed = true;
Assert.IsFalse(poolMapper.Unmap(ref memoryPoolDsp)); ClassicAssert.IsFalse(poolMapper.Unmap(ref memoryPoolDsp));
memoryPoolDsp.IsUsed = false; memoryPoolDsp.IsUsed = false;
Assert.IsTrue(poolMapper.Unmap(ref memoryPoolDsp)); ClassicAssert.IsTrue(poolMapper.Unmap(ref memoryPoolDsp));
} }
[Test] [Test]
@ -90,45 +91,45 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
PoolMapper poolMapper = new(DummyProcessHandle, true); 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); ClassicAssert.AreEqual(ResultCode.InvalidAddressInfo, errorInfo.ErrorCode);
Assert.AreEqual(0, errorInfo.ExtraErrorInfo); ClassicAssert.AreEqual(0, errorInfo.ExtraErrorInfo);
Assert.AreEqual(0, addressInfo.ForceMappedDspAddress); 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); ClassicAssert.AreEqual(ResultCode.InvalidAddressInfo, errorInfo.ErrorCode);
Assert.AreEqual(CpuAddress, errorInfo.ExtraErrorInfo); ClassicAssert.AreEqual(CpuAddress, errorInfo.ExtraErrorInfo);
Assert.AreEqual(DspAddress, addressInfo.ForceMappedDspAddress); ClassicAssert.AreEqual(DspAddress, addressInfo.ForceMappedDspAddress);
poolMapper = new PoolMapper(DummyProcessHandle, false); 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; 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); ClassicAssert.AreEqual(ResultCode.InvalidAddressInfo, errorInfo.ErrorCode);
Assert.AreEqual(CpuAddress, errorInfo.ExtraErrorInfo); ClassicAssert.AreEqual(CpuAddress, errorInfo.ExtraErrorInfo);
Assert.AreEqual(0, addressInfo.ForceMappedDspAddress); ClassicAssert.AreEqual(0, addressInfo.ForceMappedDspAddress);
poolMapper = new PoolMapper(DummyProcessHandle, memoryPoolStateArray.AsMemory(), false); 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); ClassicAssert.AreEqual(ResultCode.InvalidAddressInfo, errorInfo.ErrorCode);
Assert.AreEqual(CpuAddressRegionEnding, errorInfo.ExtraErrorInfo); ClassicAssert.AreEqual(CpuAddressRegionEnding, errorInfo.ExtraErrorInfo);
Assert.AreEqual(0, addressInfo.ForceMappedDspAddress); ClassicAssert.AreEqual(0, addressInfo.ForceMappedDspAddress);
Assert.IsFalse(addressInfo.HasMemoryPoolState); 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); ClassicAssert.AreEqual(ResultCode.Success, errorInfo.ErrorCode);
Assert.AreEqual(0, errorInfo.ExtraErrorInfo); ClassicAssert.AreEqual(0, errorInfo.ExtraErrorInfo);
Assert.AreEqual(0, addressInfo.ForceMappedDspAddress); ClassicAssert.AreEqual(0, addressInfo.ForceMappedDspAddress);
Assert.IsTrue(addressInfo.HasMemoryPoolState); ClassicAssert.IsTrue(addressInfo.HasMemoryPoolState);
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Server.Splitter; using Ryujinx.Audio.Renderer.Server.Splitter;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,8 +10,8 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0xE0, Unsafe.SizeOf<SplitterDestinationVersion1>()); ClassicAssert.AreEqual(0xE0, Unsafe.SizeOf<SplitterDestinationVersion1>());
Assert.AreEqual(0x128, Unsafe.SizeOf<SplitterDestinationVersion2>()); ClassicAssert.AreEqual(0x128, Unsafe.SizeOf<SplitterDestinationVersion2>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Server.Splitter; using Ryujinx.Audio.Renderer.Server.Splitter;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x20, Unsafe.SizeOf<SplitterState>()); ClassicAssert.AreEqual(0x20, Unsafe.SizeOf<SplitterState>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Server.Voice; using Ryujinx.Audio.Renderer.Server.Voice;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0xD0, Unsafe.SizeOf<VoiceChannelResource>()); ClassicAssert.AreEqual(0xD0, Unsafe.SizeOf<VoiceChannelResource>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Server.Voice; using Ryujinx.Audio.Renderer.Server.Voice;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.LessOrEqual(Unsafe.SizeOf<VoiceInfo>(), 0x238); ClassicAssert.LessOrEqual(Unsafe.SizeOf<VoiceInfo>(), 0x238);
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Server.Voice; using Ryujinx.Audio.Renderer.Server.Voice;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer.Server
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x58, Unsafe.SizeOf<WaveBuffer>()); ClassicAssert.AreEqual(0x58, Unsafe.SizeOf<WaveBuffer>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter; using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x70, Unsafe.SizeOf<VoiceChannelResourceInParameter>()); ClassicAssert.AreEqual(0x70, Unsafe.SizeOf<VoiceChannelResourceInParameter>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter; using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,8 +10,8 @@ namespace Ryujinx.Tests.Audio.Renderer
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x170, Unsafe.SizeOf<VoiceInParameter1>()); ClassicAssert.AreEqual(0x170, Unsafe.SizeOf<VoiceInParameter1>());
Assert.AreEqual(0x188, Unsafe.SizeOf<VoiceInParameter2>()); ClassicAssert.AreEqual(0x188, Unsafe.SizeOf<VoiceInParameter2>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Audio.Renderer.Parameter; using Ryujinx.Audio.Renderer.Parameter;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -9,7 +10,7 @@ namespace Ryujinx.Tests.Audio.Renderer
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x10, Unsafe.SizeOf<VoiceOutStatus>()); ClassicAssert.AreEqual(0x10, Unsafe.SizeOf<VoiceOutStatus>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Common.Extensions; using Ryujinx.Common.Extensions;
using Ryujinx.Memory; using Ryujinx.Memory;
using System; using System;
@ -31,7 +32,7 @@ namespace Ryujinx.Tests.Common.Extensions
ref readonly MyUnmanagedStruct read = ref sequenceReader.GetRefOrRefToCopy<MyUnmanagedStruct>(out _); ref readonly MyUnmanagedStruct read = ref sequenceReader.GetRefOrRefToCopy<MyUnmanagedStruct>(out _);
// Assert // 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); ref readonly MyUnmanagedStruct read = ref sequenceReader.GetRefOrRefToCopy<MyUnmanagedStruct>(out var copy);
// Assert // Assert
MyUnmanagedStruct.Assert(Assert.AreEqual, original, read); MyUnmanagedStruct.Assert(ClassicAssert.AreEqual, original, read);
MyUnmanagedStruct.Assert(Assert.AreEqual, read, copy); 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); ref readonly MyUnmanagedStruct read = ref sequenceReader.GetRefOrRefToCopy<MyUnmanagedStruct>(out var copy);
// Assert // Assert
MyUnmanagedStruct.Assert(Assert.AreEqual, original, read); MyUnmanagedStruct.Assert(ClassicAssert.AreEqual, original, read);
MyUnmanagedStruct.Assert(Assert.AreNotEqual, read, copy); MyUnmanagedStruct.Assert(ClassicAssert.AreNotEqual, read, copy);
} }
} }
@ -86,7 +87,7 @@ namespace Ryujinx.Tests.Common.Extensions
ReadOnlySequence<byte> sequence = CreateSegmentedByteSequence(originalStructs, int.MaxValue); ReadOnlySequence<byte> sequence = CreateSegmentedByteSequence(originalStructs, int.MaxValue);
// Act/Assert // Act/Assert
Assert.Throws<ArgumentOutOfRangeException>(() => ClassicAssert.Throws<ArgumentOutOfRangeException>(() =>
{ {
var sequenceReader = new SequenceReader<byte>(sequence); var sequenceReader = new SequenceReader<byte>(sequence);
@ -112,7 +113,7 @@ namespace Ryujinx.Tests.Common.Extensions
sequenceReader.ReadLittleEndian(out int roundTrippedValue); sequenceReader.ReadLittleEndian(out int roundTrippedValue);
// Assert // Assert
Assert.AreEqual(TestValue, roundTrippedValue); ClassicAssert.AreEqual(TestValue, roundTrippedValue);
} }
[Test] [Test]
@ -131,7 +132,7 @@ namespace Ryujinx.Tests.Common.Extensions
sequenceReader.ReadLittleEndian(out int roundTrippedValue); sequenceReader.ReadLittleEndian(out int roundTrippedValue);
// Assert // Assert
Assert.AreNotEqual(TestValue, roundTrippedValue); ClassicAssert.AreNotEqual(TestValue, roundTrippedValue);
} }
[Test] [Test]
@ -145,7 +146,7 @@ namespace Ryujinx.Tests.Common.Extensions
BinaryPrimitives.WriteInt32BigEndian(buffer.AsSpan(), TestValue); BinaryPrimitives.WriteInt32BigEndian(buffer.AsSpan(), TestValue);
// Act/Assert // Act/Assert
Assert.Throws<ArgumentOutOfRangeException>(() => ClassicAssert.Throws<ArgumentOutOfRangeException>(() =>
{ {
var sequenceReader = new SequenceReader<byte>(new ReadOnlySequence<byte>(buffer)); var sequenceReader = new SequenceReader<byte>(new ReadOnlySequence<byte>(buffer));
sequenceReader.Advance(1); sequenceReader.Advance(1);
@ -171,7 +172,7 @@ namespace Ryujinx.Tests.Common.Extensions
ReadOnlySequence<byte> sequence = CreateSegmentedByteSequence(originalStructs, int.MaxValue); ReadOnlySequence<byte> sequence = CreateSegmentedByteSequence(originalStructs, int.MaxValue);
// Act/Assert // Act/Assert
Assert.Throws<ArgumentOutOfRangeException>(() => ClassicAssert.Throws<ArgumentOutOfRangeException>(() =>
{ {
var sequenceReader = new SequenceReader<byte>(sequence); var sequenceReader = new SequenceReader<byte>(sequence);
@ -198,7 +199,7 @@ namespace Ryujinx.Tests.Common.Extensions
ReadOnlySequence<byte> sequence = CreateSegmentedByteSequence(originalStructs, MyUnmanagedStruct.SizeOf); ReadOnlySequence<byte> sequence = CreateSegmentedByteSequence(originalStructs, MyUnmanagedStruct.SizeOf);
Assert.Throws<ArgumentOutOfRangeException>(() => ClassicAssert.Throws<ArgumentOutOfRangeException>(() =>
{ {
var sequenceReader = new SequenceReader<byte>(sequence); var sequenceReader = new SequenceReader<byte>(sequence);
@ -221,7 +222,7 @@ namespace Ryujinx.Tests.Common.Extensions
sequenceReader.ReadUnmanaged(out MyUnmanagedStruct read); sequenceReader.ReadUnmanaged(out MyUnmanagedStruct read);
// Assert // 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) static void SetConsumedAndAssert(scoped ref SequenceReader<byte> sequenceReader, long consumed)
{ {
sequenceReader.SetConsumed(consumed); sequenceReader.SetConsumed(consumed);
Assert.AreEqual(consumed, sequenceReader.Consumed); ClassicAssert.AreEqual(consumed, sequenceReader.Consumed);
} }
// Act/Assert // Act/Assert
ref readonly MyUnmanagedStruct struct0A = ref sequenceReader.GetRefOrRefToCopy<MyUnmanagedStruct>(out _); 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); SetConsumedAndAssert(ref sequenceReader, 0);
ref readonly MyUnmanagedStruct struct0B = ref sequenceReader.GetRefOrRefToCopy<MyUnmanagedStruct>(out _); 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); SetConsumedAndAssert(ref sequenceReader, 1);
@ -261,7 +262,7 @@ namespace Ryujinx.Tests.Common.Extensions
ref readonly MyUnmanagedStruct struct1B = ref sequenceReader.GetRefOrRefToCopy<MyUnmanagedStruct>(out _); 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)] [StructLayout(LayoutKind.Sequential, Pack = 1)]

View file

@ -2,6 +2,7 @@ using ARMeilleure.Common;
using ARMeilleure.Memory; using ARMeilleure.Memory;
using ARMeilleure.Translation; using ARMeilleure.Translation;
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Cpu.Jit; using Ryujinx.Cpu.Jit;
using Ryujinx.Tests.Memory; using Ryujinx.Tests.Memory;
using System; using System;
@ -48,7 +49,7 @@ namespace Ryujinx.Tests.Cpu
// Subnormal results are not flushed to zero by default. // 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. // 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 methodCalled = false;
bool isFz = false; bool isFz = false;
@ -61,11 +62,11 @@ namespace Ryujinx.Tests.Cpu
int result = method(Marshal.GetFunctionPointerForDelegate(ManagedMethod)); int result = method(Marshal.GetFunctionPointerForDelegate(ManagedMethod));
// Subnormal results are not flushed to zero by default, which we should have returned to exiting the method. // 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); ClassicAssert.True(result == 0);
Assert.True(methodCalled); ClassicAssert.True(methodCalled);
Assert.True(isFz); ClassicAssert.True(isFz);
return; return;
void ManagedMethod() void ManagedMethod()

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.HLE.HOS.Applets; using Ryujinx.HLE.HOS.Applets;
using System.Text; using System.Text;
@ -9,13 +10,13 @@ namespace Ryujinx.Tests.HLE
[Test] [Test]
public void StripUnicodeControlCodes_NullInput() public void StripUnicodeControlCodes_NullInput()
{ {
Assert.IsNull(SoftwareKeyboardApplet.StripUnicodeControlCodes(null)); ClassicAssert.IsNull(SoftwareKeyboardApplet.StripUnicodeControlCodes(null));
} }
[Test] [Test]
public void StripUnicodeControlCodes_EmptyInput() public void StripUnicodeControlCodes_EmptyInput()
{ {
Assert.AreEqual(string.Empty, SoftwareKeyboardApplet.StripUnicodeControlCodes(string.Empty)); ClassicAssert.AreEqual(string.Empty, SoftwareKeyboardApplet.StripUnicodeControlCodes(string.Empty));
} }
[Test] [Test]
@ -35,14 +36,14 @@ namespace Ryujinx.Tests.HLE
foreach (string prompt in prompts) foreach (string prompt in prompts)
{ {
Assert.AreEqual(prompt, SoftwareKeyboardApplet.StripUnicodeControlCodes(prompt)); ClassicAssert.AreEqual(prompt, SoftwareKeyboardApplet.StripUnicodeControlCodes(prompt));
} }
} }
[Test] [Test]
public void StripUnicodeControlCodes_StripsNewlines() 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] [Test]
@ -50,14 +51,14 @@ namespace Ryujinx.Tests.HLE
{ {
// 0x13 is control code DC3 used by some games // 0x13 is control code DC3 used by some games
string specialInput = Encoding.UTF8.GetString(new byte[] { 0x13, 0x53, 0x68, 0x69, 0x6E, 0x65, 0x13 }); 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] [Test]
public void StripUnicodeControlCodes_StripsToEmptyString() public void StripUnicodeControlCodes_StripsToEmptyString()
{ {
string specialInput = Encoding.UTF8.GetString(new byte[] { 17, 18, 19, 20 }); // DC1 - DC4 special codes 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] [Test]
@ -65,7 +66,7 @@ namespace Ryujinx.Tests.HLE
{ {
// Turtles are a good example of multi-codepoint Unicode chars // Turtles are a good example of multi-codepoint Unicode chars
string specialInput = "♀ 🐢 🐢 ♂ "; string specialInput = "♀ 🐢 🐢 ♂ ";
Assert.AreEqual(specialInput, SoftwareKeyboardApplet.StripUnicodeControlCodes(specialInput)); ClassicAssert.AreEqual(specialInput, SoftwareKeyboardApplet.StripUnicodeControlCodes(specialInput));
} }
} }
} }

View file

@ -3,6 +3,7 @@ using ARMeilleure.Memory;
using ARMeilleure.Signal; using ARMeilleure.Signal;
using ARMeilleure.Translation; using ARMeilleure.Translation;
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Common.Memory.PartialUnmaps; using Ryujinx.Common.Memory.PartialUnmaps;
using Ryujinx.Cpu; using Ryujinx.Cpu;
using Ryujinx.Cpu.Jit; using Ryujinx.Cpu.Jit;
@ -159,13 +160,13 @@ namespace Ryujinx.Tests.Memory
if (OperatingSystem.IsWindows()) if (OperatingSystem.IsWindows())
{ {
// One thread should be present on the thread local map. Trimming should remove it. // 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; shouldAccess = false;
testThread.Join(); testThread.Join();
Assert.False(error); ClassicAssert.False(error);
string test = null; string test = null;
@ -182,7 +183,7 @@ namespace Ryujinx.Tests.Memory
{ {
state.TrimThreads(); 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; writeLoopState.Running = 0;
testThread.Join(); testThread.Join();
Assert.False(writeLoopState.Error != 0); ClassicAssert.False(writeLoopState.Error != 0);
} }
finally finally
{ {
@ -307,11 +308,11 @@ namespace Ryujinx.Tests.Memory
testThread.Start(); testThread.Start();
Thread.Sleep(200); 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. // Trimming should not remove the thread as it's still active.
state.TrimThreads(); state.TrimThreads();
Assert.AreEqual(1, CountThreads(ref state)); ClassicAssert.AreEqual(1, CountThreads(ref state));
running = false; running = false;
@ -319,7 +320,7 @@ namespace Ryujinx.Tests.Memory
// Should trim now that it's inactive. // Should trim now that it's inactive.
state.TrimThreads(); state.TrimThreads();
Assert.AreEqual(0, CountThreads(ref state)); ClassicAssert.AreEqual(0, CountThreads(ref state));
} }
[Test] [Test]
@ -340,35 +341,35 @@ namespace Ryujinx.Tests.Memory
for (int i = 0; i < ThreadLocalMap<int>.MapSize; i++) for (int i = 0; i < ThreadLocalMap<int>.MapSize; i++)
{ {
// Should obtain the index matching the call #. // 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. // Check that this and all previously reserved thread IDs and struct contents are intact.
for (int j = 0; j <= i; j++) for (int j = 0; j <= i; j++)
{ {
Assert.AreEqual(j + 1, state.LocalCounts.ThreadIds[j]); ClassicAssert.AreEqual(j + 1, state.LocalCounts.ThreadIds[j]);
Assert.AreEqual(j, state.LocalCounts.Structs[j]); ClassicAssert.AreEqual(j, state.LocalCounts.Structs[j]);
} }
} }
// Trying to reserve again when the map is full should return -1. // 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++) for (int i = 0; i < ThreadLocalMap<int>.MapSize; i++)
{ {
// Should obtain the index matching the call #, as it already exists. // 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. // 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. // Clear one of the ids as if it were freed.
state.LocalCounts.ThreadIds[13] = 0; state.LocalCounts.ThreadIds[13] = 0;
// GetOrReserve should now obtain and return 13. // GetOrReserve should now obtain and return 13.
Assert.AreEqual(13, getOrReserve(300, 301)); ClassicAssert.AreEqual(13, getOrReserve(300, 301));
Assert.AreEqual(300, state.LocalCounts.ThreadIds[13]); ClassicAssert.AreEqual(300, state.LocalCounts.ThreadIds[13]);
Assert.AreEqual(301, state.LocalCounts.Structs[13]); ClassicAssert.AreEqual(301, state.LocalCounts.Structs[13]);
} }
} }
@ -467,7 +468,7 @@ namespace Ryujinx.Tests.Memory
thread.Join(); thread.Join();
} }
Assert.False(error); ClassicAssert.False(error);
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.HLE.HOS.Services.Time.TimeZone; using Ryujinx.HLE.HOS.Services.Time.TimeZone;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
@ -11,7 +12,7 @@ namespace Ryujinx.Tests.Time
[Test] [Test]
public void EnsureTypeSize() public void EnsureTypeSize()
{ {
Assert.AreEqual(0x4000, Unsafe.SizeOf<TimeZoneRule>()); ClassicAssert.AreEqual(0x4000, Unsafe.SizeOf<TimeZoneRule>());
} }
} }
} }

View file

@ -1,4 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using NUnit.Framework.Legacy;
using Ryujinx.Common.Collections; using Ryujinx.Common.Collections;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
@ -12,7 +13,7 @@ namespace Ryujinx.Tests.Collections
{ {
TreeDictionary<int, int> dictionary = new(); TreeDictionary<int, int> dictionary = new();
Assert.AreEqual(dictionary.Count, 0); ClassicAssert.AreEqual(dictionary.Count, 0);
dictionary.Add(2, 7); dictionary.Add(2, 7);
dictionary.Add(1, 4); dictionary.Add(1, 4);
@ -22,7 +23,7 @@ namespace Ryujinx.Tests.Collections
dictionary.Add(11, 2); dictionary.Add(11, 2);
dictionary.Add(5, 2); dictionary.Add(5, 2);
Assert.AreEqual(dictionary.Count, 7); ClassicAssert.AreEqual(dictionary.Count, 7);
List<KeyValuePair<int, int>> list = dictionary.AsLevelOrderList(); List<KeyValuePair<int, int>> list = dictionary.AsLevelOrderList();
@ -36,14 +37,14 @@ namespace Ryujinx.Tests.Collections
* *
*/ */
Assert.AreEqual(list.Count, dictionary.Count); ClassicAssert.AreEqual(list.Count, dictionary.Count);
Assert.AreEqual(list[0].Key, 2); ClassicAssert.AreEqual(list[0].Key, 2);
Assert.AreEqual(list[1].Key, 1); ClassicAssert.AreEqual(list[1].Key, 1);
Assert.AreEqual(list[2].Key, 4); ClassicAssert.AreEqual(list[2].Key, 4);
Assert.AreEqual(list[3].Key, 3); ClassicAssert.AreEqual(list[3].Key, 3);
Assert.AreEqual(list[4].Key, 10); ClassicAssert.AreEqual(list[4].Key, 10);
Assert.AreEqual(list[5].Key, 5); ClassicAssert.AreEqual(list[5].Key, 5);
Assert.AreEqual(list[6].Key, 11); ClassicAssert.AreEqual(list[6].Key, 11);
} }
[Test] [Test]
@ -51,7 +52,7 @@ namespace Ryujinx.Tests.Collections
{ {
TreeDictionary<int, int> dictionary = new(); TreeDictionary<int, int> dictionary = new();
Assert.AreEqual(dictionary.Count, 0); ClassicAssert.AreEqual(dictionary.Count, 0);
dictionary.Add(2, 7); dictionary.Add(2, 7);
dictionary.Add(1, 4); dictionary.Add(1, 4);
@ -66,7 +67,7 @@ namespace Ryujinx.Tests.Collections
dictionary.Add(13, 2); dictionary.Add(13, 2);
dictionary.Add(24, 2); dictionary.Add(24, 2);
dictionary.Add(6, 2); dictionary.Add(6, 2);
Assert.AreEqual(dictionary.Count, 13); ClassicAssert.AreEqual(dictionary.Count, 13);
List<KeyValuePair<int, int>> list = dictionary.AsLevelOrderList(); List<KeyValuePair<int, int>> list = dictionary.AsLevelOrderList();
@ -84,20 +85,20 @@ namespace Ryujinx.Tests.Collections
{ {
Console.WriteLine($"{node.Key} -> {node.Value}"); Console.WriteLine($"{node.Key} -> {node.Value}");
} }
Assert.AreEqual(list.Count, dictionary.Count); ClassicAssert.AreEqual(list.Count, dictionary.Count);
Assert.AreEqual(list[0].Key, 4); ClassicAssert.AreEqual(list[0].Key, 4);
Assert.AreEqual(list[1].Key, 2); ClassicAssert.AreEqual(list[1].Key, 2);
Assert.AreEqual(list[2].Key, 10); ClassicAssert.AreEqual(list[2].Key, 10);
Assert.AreEqual(list[3].Key, 1); ClassicAssert.AreEqual(list[3].Key, 1);
Assert.AreEqual(list[4].Key, 3); ClassicAssert.AreEqual(list[4].Key, 3);
Assert.AreEqual(list[5].Key, 7); ClassicAssert.AreEqual(list[5].Key, 7);
Assert.AreEqual(list[6].Key, 13); ClassicAssert.AreEqual(list[6].Key, 13);
Assert.AreEqual(list[7].Key, 5); ClassicAssert.AreEqual(list[7].Key, 5);
Assert.AreEqual(list[8].Key, 9); ClassicAssert.AreEqual(list[8].Key, 9);
Assert.AreEqual(list[9].Key, 11); ClassicAssert.AreEqual(list[9].Key, 11);
Assert.AreEqual(list[10].Key, 24); ClassicAssert.AreEqual(list[10].Key, 24);
Assert.AreEqual(list[11].Key, 6); ClassicAssert.AreEqual(list[11].Key, 6);
Assert.AreEqual(list[12].Key, 8); ClassicAssert.AreEqual(list[12].Key, 8);
list.Clear(); list.Clear();
@ -118,18 +119,18 @@ namespace Ryujinx.Tests.Collections
{ {
Console.WriteLine($"{node.Key} -> {node.Value}"); Console.WriteLine($"{node.Key} -> {node.Value}");
} }
Assert.AreEqual(list[0].Key, 4); ClassicAssert.AreEqual(list[0].Key, 4);
Assert.AreEqual(list[1].Key, 2); ClassicAssert.AreEqual(list[1].Key, 2);
Assert.AreEqual(list[2].Key, 10); ClassicAssert.AreEqual(list[2].Key, 10);
Assert.AreEqual(list[3].Key, 1); ClassicAssert.AreEqual(list[3].Key, 1);
Assert.AreEqual(list[4].Key, 3); ClassicAssert.AreEqual(list[4].Key, 3);
Assert.AreEqual(list[5].Key, 6); ClassicAssert.AreEqual(list[5].Key, 6);
Assert.AreEqual(list[6].Key, 13); ClassicAssert.AreEqual(list[6].Key, 13);
Assert.AreEqual(list[7].Key, 5); ClassicAssert.AreEqual(list[7].Key, 5);
Assert.AreEqual(list[8].Key, 9); ClassicAssert.AreEqual(list[8].Key, 9);
Assert.AreEqual(list[9].Key, 11); ClassicAssert.AreEqual(list[9].Key, 11);
Assert.AreEqual(list[10].Key, 24); ClassicAssert.AreEqual(list[10].Key, 24);
Assert.AreEqual(list[11].Key, 8); ClassicAssert.AreEqual(list[11].Key, 8);
list.Clear(); list.Clear();
@ -149,17 +150,17 @@ namespace Ryujinx.Tests.Collections
{ {
Console.WriteLine($"{node.Key} -> {node.Value}"); Console.WriteLine($"{node.Key} -> {node.Value}");
} }
Assert.AreEqual(list[0].Key, 4); ClassicAssert.AreEqual(list[0].Key, 4);
Assert.AreEqual(list[1].Key, 2); ClassicAssert.AreEqual(list[1].Key, 2);
Assert.AreEqual(list[2].Key, 9); ClassicAssert.AreEqual(list[2].Key, 9);
Assert.AreEqual(list[3].Key, 1); ClassicAssert.AreEqual(list[3].Key, 1);
Assert.AreEqual(list[4].Key, 3); ClassicAssert.AreEqual(list[4].Key, 3);
Assert.AreEqual(list[5].Key, 6); ClassicAssert.AreEqual(list[5].Key, 6);
Assert.AreEqual(list[6].Key, 13); ClassicAssert.AreEqual(list[6].Key, 13);
Assert.AreEqual(list[7].Key, 5); ClassicAssert.AreEqual(list[7].Key, 5);
Assert.AreEqual(list[8].Key, 8); ClassicAssert.AreEqual(list[8].Key, 8);
Assert.AreEqual(list[9].Key, 11); ClassicAssert.AreEqual(list[9].Key, 11);
Assert.AreEqual(list[10].Key, 24); ClassicAssert.AreEqual(list[10].Key, 24);
} }
[Test] [Test]
@ -167,7 +168,7 @@ namespace Ryujinx.Tests.Collections
{ {
TreeDictionary<int, int> dictionary = new(); TreeDictionary<int, int> dictionary = new();
Assert.AreEqual(dictionary.Count, 0); ClassicAssert.AreEqual(dictionary.Count, 0);
dictionary.Add(2, 7); dictionary.Add(2, 7);
dictionary.Add(1, 4); dictionary.Add(1, 4);
@ -182,7 +183,7 @@ namespace Ryujinx.Tests.Collections
dictionary.Add(13, 2); dictionary.Add(13, 2);
dictionary.Add(24, 2); dictionary.Add(24, 2);
dictionary.Add(6, 2); dictionary.Add(6, 2);
Assert.AreEqual(dictionary.Count, 13); ClassicAssert.AreEqual(dictionary.Count, 13);
List<KeyValuePair<int, int>> list = dictionary.AsLevelOrderList(); List<KeyValuePair<int, int>> list = dictionary.AsLevelOrderList();
@ -201,44 +202,44 @@ namespace Ryujinx.Tests.Collections
* 6 8 * 6 8
*/ */
Assert.AreEqual(list.Count, dictionary.Count); ClassicAssert.AreEqual(list.Count, dictionary.Count);
Assert.AreEqual(list[0].Key, 4); ClassicAssert.AreEqual(list[0].Key, 4);
Assert.AreEqual(list[1].Key, 2); ClassicAssert.AreEqual(list[1].Key, 2);
Assert.AreEqual(list[2].Key, 10); ClassicAssert.AreEqual(list[2].Key, 10);
Assert.AreEqual(list[3].Key, 1); ClassicAssert.AreEqual(list[3].Key, 1);
Assert.AreEqual(list[4].Key, 3); ClassicAssert.AreEqual(list[4].Key, 3);
Assert.AreEqual(list[5].Key, 7); ClassicAssert.AreEqual(list[5].Key, 7);
Assert.AreEqual(list[6].Key, 13); ClassicAssert.AreEqual(list[6].Key, 13);
Assert.AreEqual(list[7].Key, 5); ClassicAssert.AreEqual(list[7].Key, 5);
Assert.AreEqual(list[8].Key, 9); ClassicAssert.AreEqual(list[8].Key, 9);
Assert.AreEqual(list[9].Key, 11); ClassicAssert.AreEqual(list[9].Key, 11);
Assert.AreEqual(list[10].Key, 24); ClassicAssert.AreEqual(list[10].Key, 24);
Assert.AreEqual(list[11].Key, 6); ClassicAssert.AreEqual(list[11].Key, 6);
Assert.AreEqual(list[12].Key, 8); ClassicAssert.AreEqual(list[12].Key, 8);
Assert.AreEqual(list[4].Value, 2); ClassicAssert.AreEqual(list[4].Value, 2);
dictionary.Add(3, 4); dictionary.Add(3, 4);
list = dictionary.AsLevelOrderList(); 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. // Assure that none of the nodes locations have been modified.
Assert.AreEqual(list[0].Key, 4); ClassicAssert.AreEqual(list[0].Key, 4);
Assert.AreEqual(list[1].Key, 2); ClassicAssert.AreEqual(list[1].Key, 2);
Assert.AreEqual(list[2].Key, 10); ClassicAssert.AreEqual(list[2].Key, 10);
Assert.AreEqual(list[3].Key, 1); ClassicAssert.AreEqual(list[3].Key, 1);
Assert.AreEqual(list[4].Key, 3); ClassicAssert.AreEqual(list[4].Key, 3);
Assert.AreEqual(list[5].Key, 7); ClassicAssert.AreEqual(list[5].Key, 7);
Assert.AreEqual(list[6].Key, 13); ClassicAssert.AreEqual(list[6].Key, 13);
Assert.AreEqual(list[7].Key, 5); ClassicAssert.AreEqual(list[7].Key, 5);
Assert.AreEqual(list[8].Key, 9); ClassicAssert.AreEqual(list[8].Key, 9);
Assert.AreEqual(list[9].Key, 11); ClassicAssert.AreEqual(list[9].Key, 11);
Assert.AreEqual(list[10].Key, 24); ClassicAssert.AreEqual(list[10].Key, 24);
Assert.AreEqual(list[11].Key, 6); ClassicAssert.AreEqual(list[11].Key, 6);
Assert.AreEqual(list[12].Key, 8); ClassicAssert.AreEqual(list[12].Key, 8);
} }
} }
} }