From 0bf11b2a6bc12dc517776bed4346e6e80d3a05fa Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 14 Jan 2023 20:48:34 +0100 Subject: [PATCH 1/4] Bump NuGet packages to latest stable --- .../ComputeSharp.Benchmark.csproj | 2 +- .../ComputeSharp.SwapChain.Uwp.csproj | 2 +- ...puteSharp.D2D1.Tests.AssemblyLevelAttributes.csproj | 4 ++-- .../ComputeSharp.D2D1.Tests.csproj | 8 ++++---- tests/ComputeSharp.D2D1.Tests/Helpers/D2D1Helper.cs | 10 +++++----- .../ComputeSharp.Tests.DeviceLost.csproj | 4 ++-- ...ComputeSharp.Tests.DisableDynamicCompilation.csproj | 4 ++-- .../ComputeSharp.Tests.GlobalStatements.csproj | 2 +- .../ComputeSharp.Tests.Internals.csproj | 4 ++-- .../ComputeSharp.Tests.NativeLibrariesResolver.csproj | 4 ++-- .../ComputeSharp.Tests.SourceGenerators.csproj | 4 ++-- tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj | 4 ++-- 12 files changed, 26 insertions(+), 26 deletions(-) diff --git a/samples/ComputeSharp.Benchmark/ComputeSharp.Benchmark.csproj b/samples/ComputeSharp.Benchmark/ComputeSharp.Benchmark.csproj index d73eb132..f8982662 100644 --- a/samples/ComputeSharp.Benchmark/ComputeSharp.Benchmark.csproj +++ b/samples/ComputeSharp.Benchmark/ComputeSharp.Benchmark.csproj @@ -20,7 +20,7 @@ - + diff --git a/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj b/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj index 7ec98aa3..228dd36e 100644 --- a/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj +++ b/samples/ComputeSharp.SwapChain.Uwp/ComputeSharp.SwapChain.Uwp.csproj @@ -181,7 +181,7 @@ 7.1.3 - 2.8.1 + 2.8.2 diff --git a/tests/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj b/tests/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj index 76766a37..fd2c5f0b 100644 --- a/tests/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj +++ b/tests/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj @@ -8,8 +8,8 @@ - - + + diff --git a/tests/ComputeSharp.D2D1.Tests/ComputeSharp.D2D1.Tests.csproj b/tests/ComputeSharp.D2D1.Tests/ComputeSharp.D2D1.Tests.csproj index 24781e4d..4450891e 100644 --- a/tests/ComputeSharp.D2D1.Tests/ComputeSharp.D2D1.Tests.csproj +++ b/tests/ComputeSharp.D2D1.Tests/ComputeSharp.D2D1.Tests.csproj @@ -12,11 +12,11 @@ - - + + - - + + diff --git a/tests/ComputeSharp.D2D1.Tests/Helpers/D2D1Helper.cs b/tests/ComputeSharp.D2D1.Tests/Helpers/D2D1Helper.cs index e6c764d9..26bd84ac 100644 --- a/tests/ComputeSharp.D2D1.Tests/Helpers/D2D1Helper.cs +++ b/tests/ComputeSharp.D2D1.Tests/Helpers/D2D1Helper.cs @@ -18,7 +18,7 @@ using D2D1_FACTORY_TYPE = FactoryType; using D2D1_INTERPOLATION_MODE = InterpolationMode; using D2D1_COMPOSITE_MODE = Win32.Graphics.Direct2D.Common.CompositeMode; using D2D1_MAP_OPTIONS = MapOptions; -using D2D_RECT_U = Win32.Graphics.Direct2D.Common.RectU; +using D2D_RECT_U = Win32.Numerics.Rect; using D2D1_MAPPED_RECT = Win32.Graphics.Direct2D.MappedRect; using D2D1_BITMAP_PROPERTIES = BitmapProperties; using D2D1_BITMAP_PROPERTIES1 = BitmapProperties1; @@ -223,10 +223,10 @@ internal static class D2D1Helper Point d2DPointDestination = default; D2D_RECT_U d2DRectSource = default; - d2DRectSource.top = 0; - d2DRectSource.left = 0; - d2DRectSource.right = (uint)d2DSize.Width; - d2DRectSource.bottom = (uint)d2DSize.Height; + d2DRectSource.Top = 0; + d2DRectSource.Left = 0; + d2DRectSource.Right = d2DSize.Width; + d2DRectSource.Bottom = d2DSize.Height; // Copy the image from the target to the readback bitmap _ = d2D1Bitmap1Buffer.Get()->CopyFromBitmap( diff --git a/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj b/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj index dcf61143..611ab6e7 100644 --- a/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj +++ b/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/tests/ComputeSharp.Tests.DisableDynamicCompilation/ComputeSharp.Tests.DisableDynamicCompilation.csproj b/tests/ComputeSharp.Tests.DisableDynamicCompilation/ComputeSharp.Tests.DisableDynamicCompilation.csproj index b8029845..beceb489 100644 --- a/tests/ComputeSharp.Tests.DisableDynamicCompilation/ComputeSharp.Tests.DisableDynamicCompilation.csproj +++ b/tests/ComputeSharp.Tests.DisableDynamicCompilation/ComputeSharp.Tests.DisableDynamicCompilation.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/tests/ComputeSharp.Tests.GlobalStatements/ComputeSharp.Tests.GlobalStatements.csproj b/tests/ComputeSharp.Tests.GlobalStatements/ComputeSharp.Tests.GlobalStatements.csproj index 93a5f5ef..9aeadcfa 100644 --- a/tests/ComputeSharp.Tests.GlobalStatements/ComputeSharp.Tests.GlobalStatements.csproj +++ b/tests/ComputeSharp.Tests.GlobalStatements/ComputeSharp.Tests.GlobalStatements.csproj @@ -9,7 +9,7 @@ - + diff --git a/tests/ComputeSharp.Tests.Internals/ComputeSharp.Tests.Internals.csproj b/tests/ComputeSharp.Tests.Internals/ComputeSharp.Tests.Internals.csproj index 5e93a87d..e600fa9c 100644 --- a/tests/ComputeSharp.Tests.Internals/ComputeSharp.Tests.Internals.csproj +++ b/tests/ComputeSharp.Tests.Internals/ComputeSharp.Tests.Internals.csproj @@ -9,8 +9,8 @@ - - + + diff --git a/tests/ComputeSharp.Tests.NativeLibrariesResolver/ComputeSharp.Tests.NativeLibrariesResolver.csproj b/tests/ComputeSharp.Tests.NativeLibrariesResolver/ComputeSharp.Tests.NativeLibrariesResolver.csproj index b74167ff..03a6934a 100644 --- a/tests/ComputeSharp.Tests.NativeLibrariesResolver/ComputeSharp.Tests.NativeLibrariesResolver.csproj +++ b/tests/ComputeSharp.Tests.NativeLibrariesResolver/ComputeSharp.Tests.NativeLibrariesResolver.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/tests/ComputeSharp.Tests.SourceGenerators/ComputeSharp.Tests.SourceGenerators.csproj b/tests/ComputeSharp.Tests.SourceGenerators/ComputeSharp.Tests.SourceGenerators.csproj index 71d5d87c..832a595b 100644 --- a/tests/ComputeSharp.Tests.SourceGenerators/ComputeSharp.Tests.SourceGenerators.csproj +++ b/tests/ComputeSharp.Tests.SourceGenerators/ComputeSharp.Tests.SourceGenerators.csproj @@ -7,8 +7,8 @@ - - + + diff --git a/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj b/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj index 28ed4a78..88c2d621 100644 --- a/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj +++ b/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj @@ -10,8 +10,8 @@ - - + + From d1f5031a97e79870ca075ada5274b1da12919268 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 14 Jan 2023 20:59:48 +0100 Subject: [PATCH 2/4] Switch InteropServicesTests to Vortice.Win32 --- .../ComputeSharp.Tests.csproj | 11 +-- .../InteropServicesTests.cs | 78 ++++++++++--------- 2 files changed, 43 insertions(+), 46 deletions(-) diff --git a/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj b/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj index 88c2d621..c7a556ff 100644 --- a/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj +++ b/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj @@ -13,6 +13,7 @@ + @@ -28,18 +29,8 @@ - - - - - - - $(NoWarn);CS0649 - - diff --git a/tests/ComputeSharp.Tests/InteropServicesTests.cs b/tests/ComputeSharp.Tests/InteropServicesTests.cs index c7944bb9..5dbdf7d7 100644 --- a/tests/ComputeSharp.Tests/InteropServicesTests.cs +++ b/tests/ComputeSharp.Tests/InteropServicesTests.cs @@ -4,12 +4,18 @@ using ComputeSharp.Resources; using ComputeSharp.Tests.Attributes; using ComputeSharp.Tests.Extensions; using Microsoft.VisualStudio.TestTools.UnitTesting; -using TerraFX.Interop.DirectX; -using TerraFX.Interop.Windows; -using static TerraFX.Interop.DirectX.D3D12_RESOURCE_DIMENSION; +using Win32; +using Win32.Graphics.Direct3D12; + +#pragma warning disable IDE0065 namespace ComputeSharp.Tests; +using D3D12_RESOURCE_DIMENSION = Win32.Graphics.Direct3D12.ResourceDimension; +using HRESULT = Win32.HResult; +using LUID = Win32.Luid; +using Win32 = Win32.Apis; + [TestClass] [TestCategory("InteropServices")] public unsafe partial class InteropServicesTests @@ -20,7 +26,7 @@ public unsafe partial class InteropServicesTests { using ComPtr d3D12Device = default; - InteropServices.GetID3D12Device(device.Get(), Windows.__uuidof(), (void**)d3D12Device.GetAddressOf()); + InteropServices.GetID3D12Device(device.Get(), Win32.__uuidof(), (void**)d3D12Device.GetAddressOf()); Assert.IsTrue(d3D12Device.Get() != null); @@ -30,9 +36,9 @@ public unsafe partial class InteropServicesTests d3D12Device.Dispose(); - int hResult = InteropServices.TryGetID3D12Device(device.Get(), Windows.__uuidof(), (void**)d3D12Device.GetAddressOf()); + int hResult = InteropServices.TryGetID3D12Device(device.Get(), Win32.__uuidof(), (void**)d3D12Device.GetAddressOf()); - Assert.AreEqual(hResult, S.S_OK); + Assert.AreEqual(hResult, (int)HRESULT.Ok); Assert.IsTrue(d3D12Device.Get() != null); luid = d3D12Device.Get()->GetAdapterLuid(); @@ -51,18 +57,18 @@ public unsafe partial class InteropServicesTests using ComPtr d3D12Resource = default; - InteropServices.GetID3D12Resource(buffer, Windows.__uuidof(), (void**)d3D12Resource.GetAddressOf()); + InteropServices.GetID3D12Resource(buffer, Win32.__uuidof(), (void**)d3D12Resource.GetAddressOf()); Assert.IsTrue(d3D12Resource.Get() != null); - Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION_BUFFER); + Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION.Buffer); d3D12Resource.Dispose(); - int hResult = InteropServices.TryGetID3D12Resource(buffer, Windows.__uuidof(), (void**)d3D12Resource.GetAddressOf()); + int hResult = InteropServices.TryGetID3D12Resource(buffer, Win32.__uuidof(), (void**)d3D12Resource.GetAddressOf()); - Assert.AreEqual(hResult, S.S_OK); + Assert.AreEqual(hResult, (int)HRESULT.Ok); Assert.IsTrue(d3D12Resource.Get() != null); - Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION_BUFFER); + Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION.Buffer); } [CombinatorialTestMethod] @@ -75,18 +81,18 @@ public unsafe partial class InteropServicesTests using ComPtr d3D12Resource = default; - InteropServices.GetID3D12Resource(buffer, Windows.__uuidof(), (void**)d3D12Resource.GetAddressOf()); + InteropServices.GetID3D12Resource(buffer, Win32.__uuidof(), (void**)d3D12Resource.GetAddressOf()); Assert.IsTrue(d3D12Resource.Get() != null); - Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION_TEXTURE2D); + Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION.Texture2D); d3D12Resource.Dispose(); - int hResult = InteropServices.TryGetID3D12Resource(buffer, Windows.__uuidof(), (void**)d3D12Resource.GetAddressOf()); + int hResult = InteropServices.TryGetID3D12Resource(buffer, Win32.__uuidof(), (void**)d3D12Resource.GetAddressOf()); - Assert.AreEqual(hResult, S.S_OK); + Assert.AreEqual(hResult, (int)HRESULT.Ok); Assert.IsTrue(d3D12Resource.Get() != null); - Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION_TEXTURE2D); + Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION.Texture2D); } [CombinatorialTestMethod] @@ -99,18 +105,18 @@ public unsafe partial class InteropServicesTests using ComPtr d3D12Resource = default; - InteropServices.GetID3D12Resource(buffer, Windows.__uuidof(), (void**)d3D12Resource.GetAddressOf()); + InteropServices.GetID3D12Resource(buffer, Win32.__uuidof(), (void**)d3D12Resource.GetAddressOf()); Assert.IsTrue(d3D12Resource.Get() != null); - Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION_TEXTURE3D); + Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION.Texture3D); d3D12Resource.Dispose(); - int hResult = InteropServices.TryGetID3D12Resource(buffer, Windows.__uuidof(), (void**)d3D12Resource.GetAddressOf()); + int hResult = InteropServices.TryGetID3D12Resource(buffer, Win32.__uuidof(), (void**)d3D12Resource.GetAddressOf()); - Assert.AreEqual(hResult, S.S_OK); + Assert.AreEqual(hResult, (int)HRESULT.Ok); Assert.IsTrue(d3D12Resource.Get() != null); - Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION_TEXTURE3D); + Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION.Texture3D); } [CombinatorialTestMethod] @@ -123,18 +129,18 @@ public unsafe partial class InteropServicesTests using ComPtr d3D12Resource = default; - InteropServices.GetID3D12Resource(buffer, Windows.__uuidof(), (void**)d3D12Resource.GetAddressOf()); + InteropServices.GetID3D12Resource(buffer, Win32.__uuidof(), (void**)d3D12Resource.GetAddressOf()); Assert.IsTrue(d3D12Resource.Get() != null); - Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION_BUFFER); + Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION.Buffer); d3D12Resource.Dispose(); - int hResult = InteropServices.TryGetID3D12Resource(buffer, Windows.__uuidof(), (void**)d3D12Resource.GetAddressOf()); + int hResult = InteropServices.TryGetID3D12Resource(buffer, Win32.__uuidof(), (void**)d3D12Resource.GetAddressOf()); - Assert.AreEqual(hResult, S.S_OK); + Assert.AreEqual(hResult, (int)HRESULT.Ok); Assert.IsTrue(d3D12Resource.Get() != null); - Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION_BUFFER); + Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION.Buffer); } [CombinatorialTestMethod] @@ -147,18 +153,18 @@ public unsafe partial class InteropServicesTests using ComPtr d3D12Resource = default; - InteropServices.GetID3D12Resource(buffer, Windows.__uuidof(), (void**)d3D12Resource.GetAddressOf()); + InteropServices.GetID3D12Resource(buffer, Win32.__uuidof(), (void**)d3D12Resource.GetAddressOf()); Assert.IsTrue(d3D12Resource.Get() != null); - Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION_BUFFER); + Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION.Buffer); d3D12Resource.Dispose(); - int hResult = InteropServices.TryGetID3D12Resource(buffer, Windows.__uuidof(), (void**)d3D12Resource.GetAddressOf()); + int hResult = InteropServices.TryGetID3D12Resource(buffer, Win32.__uuidof(), (void**)d3D12Resource.GetAddressOf()); - Assert.AreEqual(hResult, S.S_OK); + Assert.AreEqual(hResult, (int)HRESULT.Ok); Assert.IsTrue(d3D12Resource.Get() != null); - Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION_BUFFER); + Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION.Buffer); } [CombinatorialTestMethod] @@ -171,17 +177,17 @@ public unsafe partial class InteropServicesTests using ComPtr d3D12Resource = default; - InteropServices.GetID3D12Resource(buffer, Windows.__uuidof(), (void**)d3D12Resource.GetAddressOf()); + InteropServices.GetID3D12Resource(buffer, Win32.__uuidof(), (void**)d3D12Resource.GetAddressOf()); Assert.IsTrue(d3D12Resource.Get() != null); - Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION_BUFFER); + Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION.Buffer); d3D12Resource.Dispose(); - int hResult = InteropServices.TryGetID3D12Resource(buffer, Windows.__uuidof(), (void**)d3D12Resource.GetAddressOf()); + int hResult = InteropServices.TryGetID3D12Resource(buffer, Win32.__uuidof(), (void**)d3D12Resource.GetAddressOf()); - Assert.AreEqual(hResult, S.S_OK); + Assert.AreEqual(hResult, (int)HRESULT.Ok); Assert.IsTrue(d3D12Resource.Get() != null); - Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION_BUFFER); + Assert.AreEqual(d3D12Resource.Get()->GetDesc().Dimension, D3D12_RESOURCE_DIMENSION.Buffer); } } \ No newline at end of file From cd07b46f6a06c45cf65fd81c8177a76d950c9700 Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 14 Jan 2023 21:39:46 +0100 Subject: [PATCH 3/4] Switch ComputeSharp.Tests.DeviceLost to Vortice.Win32 --- .../ComputeSharp.Tests.DeviceLost.csproj | 12 ++----- .../DeviceDisposalTests.cs | 10 ++++-- .../DeviceLostTests.cs | 4 +-- .../GetDefaultDeviceTests.cs | 11 +++++-- .../Helpers/GraphicsDeviceHelper.cs | 10 ++++-- .../TerraFX.Interop.Windows/ID3D12Device5.cs | 32 ------------------- 6 files changed, 26 insertions(+), 53 deletions(-) delete mode 100644 tests/ComputeSharp.Tests.DeviceLost/TerraFX.Interop.Windows/ID3D12Device5.cs diff --git a/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj b/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj index 611ab6e7..fed652d4 100644 --- a/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj +++ b/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj @@ -11,6 +11,8 @@ + + @@ -19,16 +21,6 @@ - - - - - - - - $(NoWarn);CS0649 - diff --git a/tests/ComputeSharp.Tests.DeviceLost/DeviceDisposalTests.cs b/tests/ComputeSharp.Tests.DeviceLost/DeviceDisposalTests.cs index f2d367f0..477405a0 100644 --- a/tests/ComputeSharp.Tests.DeviceLost/DeviceDisposalTests.cs +++ b/tests/ComputeSharp.Tests.DeviceLost/DeviceDisposalTests.cs @@ -4,11 +4,15 @@ using ComputeSharp.Tests.Attributes; using ComputeSharp.Tests.DeviceLost.Helpers; using ComputeSharp.Tests.Extensions; using Microsoft.VisualStudio.TestTools.UnitTesting; -using TerraFX.Interop.DirectX; -using TerraFX.Interop.Windows; +using Win32; +using Win32.Graphics.Direct3D12; + +#pragma warning disable IDE0065 namespace ComputeSharp.Tests.DeviceLost; +using Win32 = Win32.Apis; + [TestClass] [TestCategory("DeviceDisposal")] public partial class DeviceDisposalTests @@ -51,7 +55,7 @@ public partial class DeviceDisposalTests graphicsDevice.Dispose(); - InteropServices.GetID3D12Device(graphicsDevice, Windows.__uuidof(), (void**)d3D12Device.GetAddressOf()); + InteropServices.GetID3D12Device(graphicsDevice, Win32.__uuidof(), (void**)d3D12Device.GetAddressOf()); } [CombinatorialTestMethod] diff --git a/tests/ComputeSharp.Tests.DeviceLost/DeviceLostTests.cs b/tests/ComputeSharp.Tests.DeviceLost/DeviceLostTests.cs index 5a59f3f7..708c79ae 100644 --- a/tests/ComputeSharp.Tests.DeviceLost/DeviceLostTests.cs +++ b/tests/ComputeSharp.Tests.DeviceLost/DeviceLostTests.cs @@ -5,8 +5,8 @@ using ComputeSharp.Tests.Attributes; using ComputeSharp.Tests.DeviceLost.Helpers; using ComputeSharp.Tests.Extensions; using Microsoft.VisualStudio.TestTools.UnitTesting; -using TerraFX.Interop.DirectX; -using TerraFX.Interop.Windows; +using Win32; +using Win32.Graphics.Direct3D12; namespace ComputeSharp.Tests.DeviceLost; diff --git a/tests/ComputeSharp.Tests.DeviceLost/GetDefaultDeviceTests.cs b/tests/ComputeSharp.Tests.DeviceLost/GetDefaultDeviceTests.cs index 0f20decd..c0a9bd1d 100644 --- a/tests/ComputeSharp.Tests.DeviceLost/GetDefaultDeviceTests.cs +++ b/tests/ComputeSharp.Tests.DeviceLost/GetDefaultDeviceTests.cs @@ -2,11 +2,16 @@ using System; using System.Threading.Tasks; using ComputeSharp.Tests.DeviceLost.Helpers; using Microsoft.VisualStudio.TestTools.UnitTesting; -using TerraFX.Interop.DirectX; -using TerraFX.Interop.Windows; +using Win32; +using Win32.Graphics.Direct3D12; + +#pragma warning disable IDE0065 namespace ComputeSharp.Tests.DeviceLost; +using DXGI = Win32.Graphics.Dxgi.Apis; +using HRESULT = Win32.HResult; + [TestClass] [TestCategory("GetDefaultDevice")] public class GetDefaultDeviceTests @@ -75,7 +80,7 @@ public class GetDefaultDeviceTests HRESULT removalReason = d3D12Device.Get()->GetDeviceRemovedReason(); // Sanity check that the device is in fact removed - Assert.AreEqual(DXGI.DXGI_ERROR_DEVICE_REMOVED, (int)removalReason); + Assert.AreEqual(DXGI.DXGI_ERROR_DEVICE_REMOVED, removalReason); } // Calling GraphicsDevice.GetDefault() will now throw, because the native device has not been disposed properly diff --git a/tests/ComputeSharp.Tests.DeviceLost/Helpers/GraphicsDeviceHelper.cs b/tests/ComputeSharp.Tests.DeviceLost/Helpers/GraphicsDeviceHelper.cs index de319cdf..b99e8dc2 100644 --- a/tests/ComputeSharp.Tests.DeviceLost/Helpers/GraphicsDeviceHelper.cs +++ b/tests/ComputeSharp.Tests.DeviceLost/Helpers/GraphicsDeviceHelper.cs @@ -2,11 +2,15 @@ using System; using System.Threading.Tasks; using ComputeSharp.Interop; using Microsoft.VisualStudio.TestTools.UnitTesting; -using TerraFX.Interop.DirectX; -using TerraFX.Interop.Windows; +using Win32; +using Win32.Graphics.Direct3D12; + +#pragma warning disable IDE0065 namespace ComputeSharp.Tests.DeviceLost.Helpers; +using Win32 = Win32.Apis; + /// /// A helper to do common checks on native device objects. /// @@ -21,7 +25,7 @@ internal static class GraphicsDeviceHelper { fixed (ID3D12Device** ppvObject = d3D12Device) { - InteropServices.GetID3D12Device(graphicsDevice, Windows.__uuidof(), (void**)ppvObject); + InteropServices.GetID3D12Device(graphicsDevice, Win32.__uuidof(), (void**)ppvObject); } } diff --git a/tests/ComputeSharp.Tests.DeviceLost/TerraFX.Interop.Windows/ID3D12Device5.cs b/tests/ComputeSharp.Tests.DeviceLost/TerraFX.Interop.Windows/ID3D12Device5.cs deleted file mode 100644 index 6f0fa4ea..00000000 --- a/tests/ComputeSharp.Tests.DeviceLost/TerraFX.Interop.Windows/ID3D12Device5.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright © Tanner Gooding and Contributors. Licensed under the MIT License (MIT). See License.md in the repository root for more information. - -// Ported from um/d3d12.h in the Windows SDK for Windows 10.0.20348.0 -// Original source is Copyright © Microsoft. All rights reserved. - -#if !NET6_0_OR_GREATER - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace TerraFX.Interop.DirectX; - -[Guid("8B4F173B-2FEA-4B80-8F58-4307191AB95D")] -public unsafe partial struct ID3D12Device5 -{ - public void** lpVtbl; - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public uint Release() - { - return ((delegate* unmanaged[Stdcall])this.lpVtbl[2])((ID3D12Device5*)Unsafe.AsPointer(ref this)); - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void RemoveDevice() - { - ((delegate* unmanaged[Stdcall])this.lpVtbl[58])((ID3D12Device5*)Unsafe.AsPointer(ref this)); - } -} - -#endif \ No newline at end of file From 804529431c0a08a5e22a11299028968fb1245fcc Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Sat, 14 Jan 2023 21:55:59 +0100 Subject: [PATCH 4/4] Streamline type aliases, centralize suppressions in unit tests --- ....D2D1.Tests.AssemblyLevelAttributes.csproj | 1 - .../ComputeSharp.D2D1.Tests.csproj | 1 - .../D2D1ResourceTextureManagerTests.cs | 7 ++-- .../D2D1TransformMapperTests.cs | 9 ++--- .../Effects/BokehBlurEffect.cs | 20 +++++----- .../Extensions/HRESULTExtensions.cs | 5 +-- .../Helpers/D2D1Helper.cs | 38 +++++++++---------- .../Helpers/D2D1TestRunner.cs | 5 +-- .../ComputeSharp.Tests.DeviceLost.csproj | 1 - .../DeviceDisposalTests.cs | 2 - .../GetDefaultDeviceTests.cs | 7 +--- .../Helpers/GraphicsDeviceHelper.cs | 2 - ...arp.Tests.DisableDynamicCompilation.csproj | 1 - ...ComputeSharp.Tests.GlobalStatements.csproj | 1 - .../ComputeSharp.Tests.Internals.csproj | 1 - .../ComputeSharp.Tests.csproj | 1 - .../InteropServicesTests.cs | 8 ++-- tests/Directory.Build.props | 8 ++++ 18 files changed, 49 insertions(+), 69 deletions(-) diff --git a/tests/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj b/tests/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj index fd2c5f0b..28800d8d 100644 --- a/tests/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj +++ b/tests/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes/ComputeSharp.D2D1.Tests.AssemblyLevelAttributes.csproj @@ -3,7 +3,6 @@ net472;netcoreapp3.1;net6.0;net7.0 false - $(NoWarn);CA1416 diff --git a/tests/ComputeSharp.D2D1.Tests/ComputeSharp.D2D1.Tests.csproj b/tests/ComputeSharp.D2D1.Tests/ComputeSharp.D2D1.Tests.csproj index 4450891e..6b9c5402 100644 --- a/tests/ComputeSharp.D2D1.Tests/ComputeSharp.D2D1.Tests.csproj +++ b/tests/ComputeSharp.D2D1.Tests/ComputeSharp.D2D1.Tests.csproj @@ -3,7 +3,6 @@ net472;netcoreapp3.1;net6.0;net7.0 false - $(NoWarn);CS0419;CA1416 diff --git a/tests/ComputeSharp.D2D1.Tests/D2D1ResourceTextureManagerTests.cs b/tests/ComputeSharp.D2D1.Tests/D2D1ResourceTextureManagerTests.cs index 47f3c49b..ecd7dce1 100644 --- a/tests/ComputeSharp.D2D1.Tests/D2D1ResourceTextureManagerTests.cs +++ b/tests/ComputeSharp.D2D1.Tests/D2D1ResourceTextureManagerTests.cs @@ -12,14 +12,13 @@ using SixLabors.ImageSharp; using SixLabors.ImageSharp.PixelFormats; using Win32; using Win32.Graphics.Direct2D; +using HRESULT = Win32.HResult; +using D2D1_MAPPED_RECT = Win32.Graphics.Direct2D.MappedRect; -#pragma warning disable CS0649, IDE0044, IDE0065 +#pragma warning disable CS0649, IDE0044 namespace ComputeSharp.D2D1.Tests; -using HRESULT = HResult; -using D2D1_MAPPED_RECT = MappedRect; - [TestClass] [TestCategory("D2D1ResourceTextureManager")] public partial class D2D1ResourceTextureManagerTests diff --git a/tests/ComputeSharp.D2D1.Tests/D2D1TransformMapperTests.cs b/tests/ComputeSharp.D2D1.Tests/D2D1TransformMapperTests.cs index b7be7722..edf50028 100644 --- a/tests/ComputeSharp.D2D1.Tests/D2D1TransformMapperTests.cs +++ b/tests/ComputeSharp.D2D1.Tests/D2D1TransformMapperTests.cs @@ -9,15 +9,14 @@ using ComputeSharp.Tests.Helpers; using Microsoft.VisualStudio.TestTools.UnitTesting; using Win32; using Win32.Graphics.Direct2D; +using HRESULT = Win32.HResult; +using D2D1_MAPPED_RECT = Win32.Graphics.Direct2D.MappedRect; +using Rectangle = System.Drawing.Rectangle; -#pragma warning disable CS0649, IDE0044, IDE0065 +#pragma warning disable CS0649, IDE0044 namespace ComputeSharp.D2D1.Tests; -using HRESULT = HResult; -using D2D1_MAPPED_RECT = MappedRect; -using Rectangle = System.Drawing.Rectangle; - [TestClass] [TestCategory("D2D1TransformMapper")] public partial class D2D1TransformMapperTests diff --git a/tests/ComputeSharp.D2D1.Tests/Effects/BokehBlurEffect.cs b/tests/ComputeSharp.D2D1.Tests/Effects/BokehBlurEffect.cs index 9fcd8452..ef09dc4d 100644 --- a/tests/ComputeSharp.D2D1.Tests/Effects/BokehBlurEffect.cs +++ b/tests/ComputeSharp.D2D1.Tests/Effects/BokehBlurEffect.cs @@ -11,20 +11,18 @@ using ComputeSharp.D2D1.Tests.Helpers; using SixLabors.ImageSharp; using Win32; using Win32.Graphics.Direct2D; - -#pragma warning disable IDE0065 +using D2D1_BORDER_EDGE_MODE = Win32.Graphics.Direct2D.BorderEdgeMode; +using D2D1_BORDER_PROP = Win32.Graphics.Direct2D.BorderProp; +using D2D1_BUFFER_PRECISION = Win32.Graphics.Direct2D.BufferPrecision; +using D2D1_COMPOSITE_MODE = Win32.Graphics.Direct2D.Common.CompositeMode; +using D2D1_COMPOSITE_PROP = Win32.Graphics.Direct2D.CompositeProp; +using D2D1_INTERPOLATION_MODE = Win32.Graphics.Direct2D.InterpolationMode; +using D2D1_PROPERTY = Win32.Graphics.Direct2D.Property; +using D2D1_MAPPED_RECT = Win32.Graphics.Direct2D.MappedRect; +using D2D1_RENDERING_CONTROLS = Win32.Graphics.Direct2D.RenderingControls; namespace ComputeSharp.D2D1.Tests.Effects; -using D2D1_BORDER_EDGE_MODE = BorderEdgeMode; -using D2D1_BORDER_PROP = BorderProp; -using D2D1_BUFFER_PRECISION = BufferPrecision; -using D2D1_COMPOSITE_MODE = Win32.Graphics.Direct2D.Common.CompositeMode; -using D2D1_COMPOSITE_PROP = CompositeProp; -using D2D1_INTERPOLATION_MODE = InterpolationMode; -using D2D1_PROPERTY = Property; -using D2D1_MAPPED_RECT = MappedRect; -using D2D1_RENDERING_CONTROLS = RenderingControls; using D2D1 = Win32.Graphics.Direct2D.Apis; /// diff --git a/tests/ComputeSharp.D2D1.Tests/Extensions/HRESULTExtensions.cs b/tests/ComputeSharp.D2D1.Tests/Extensions/HRESULTExtensions.cs index 273b8957..9039342d 100644 --- a/tests/ComputeSharp.D2D1.Tests/Extensions/HRESULTExtensions.cs +++ b/tests/ComputeSharp.D2D1.Tests/Extensions/HRESULTExtensions.cs @@ -4,13 +4,10 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; #endif using System.Runtime.CompilerServices; - -#pragma warning disable IDE0065 +using HRESULT = Win32.HResult; namespace ComputeSharp.D2D1.Tests.Extensions; -using HRESULT = Win32.HResult; - /// /// Helper methods to efficiently throw exceptions. /// diff --git a/tests/ComputeSharp.D2D1.Tests/Helpers/D2D1Helper.cs b/tests/ComputeSharp.D2D1.Tests/Helpers/D2D1Helper.cs index 26bd84ac..af2943fa 100644 --- a/tests/ComputeSharp.D2D1.Tests/Helpers/D2D1Helper.cs +++ b/tests/ComputeSharp.D2D1.Tests/Helpers/D2D1Helper.cs @@ -5,30 +5,28 @@ using Win32; using Win32.Graphics.Direct2D; using Win32.Graphics.Direct3D11; using Win32.Graphics.Dxgi; - -#pragma warning disable IDE0065 +using D2D1_ALPHA_MODE = Win32.Graphics.Direct2D.Common.AlphaMode; +using D2D1_BITMAP_OPTIONS = Win32.Graphics.Direct2D.BitmapOptions; +using D2D1_DEVICE_CONTEXT_OPTIONS = Win32.Graphics.Direct2D.DeviceContextOptions; +using D2D1_FACTORY_OPTIONS = Win32.Graphics.Direct2D.FactoryOptions; +using D2D1_FACTORY_TYPE = Win32.Graphics.Direct2D.FactoryType; +using D2D1_INTERPOLATION_MODE = Win32.Graphics.Direct2D.InterpolationMode; +using D2D1_COMPOSITE_MODE = Win32.Graphics.Direct2D.Common.CompositeMode; +using D2D1_MAP_OPTIONS = Win32.Graphics.Direct2D.MapOptions; +using D2D_RECT_U = Win32.Numerics.Rect; +using D2D1_MAPPED_RECT = Win32.Graphics.Direct2D.MappedRect; +using D2D1_BITMAP_PROPERTIES = Win32.Graphics.Direct2D.BitmapProperties; +using D2D1_BITMAP_PROPERTIES1 = Win32.Graphics.Direct2D.BitmapProperties1; +using D3D_FEATURE_LEVEL = Win32.Graphics.Direct3D.FeatureLevel; +using D3D_DRIVER_TYPE = Win32.Graphics.Direct3D.DriverType; +using D3D11_CREATE_DEVICE_FLAG = Win32.Graphics.Direct3D11.CreateDeviceFlags; +using DXGI_FORMAT = Win32.Graphics.Dxgi.Common.Format; +using D3D11 = Win32.Graphics.Direct3D11.Apis; namespace ComputeSharp.D2D1.Tests.Helpers; -using D2D1_ALPHA_MODE = Win32.Graphics.Direct2D.Common.AlphaMode; -using D2D1_BITMAP_OPTIONS = BitmapOptions; -using D2D1_DEVICE_CONTEXT_OPTIONS = DeviceContextOptions; -using D2D1_FACTORY_OPTIONS = FactoryOptions; -using D2D1_FACTORY_TYPE = FactoryType; -using D2D1_INTERPOLATION_MODE = InterpolationMode; -using D2D1_COMPOSITE_MODE = Win32.Graphics.Direct2D.Common.CompositeMode; -using D2D1_MAP_OPTIONS = MapOptions; -using D2D_RECT_U = Win32.Numerics.Rect; -using D2D1_MAPPED_RECT = Win32.Graphics.Direct2D.MappedRect; -using D2D1_BITMAP_PROPERTIES = BitmapProperties; -using D2D1_BITMAP_PROPERTIES1 = BitmapProperties1; -using D3D_FEATURE_LEVEL = Win32.Graphics.Direct3D.FeatureLevel; -using D3D_DRIVER_TYPE = Win32.Graphics.Direct3D.DriverType; -using D3D11_CREATE_DEVICE_FLAG = CreateDeviceFlags; -using DXGI_FORMAT = Win32.Graphics.Dxgi.Common.Format; -using Win32 = Win32.Apis; using D2D1 = Win32.Graphics.Direct2D.Apis; -using D3D11 = Win32.Graphics.Direct3D11.Apis; +using Win32 = Win32.Apis; /// /// A that uses the D2D1 APIs to configure and run effects. diff --git a/tests/ComputeSharp.D2D1.Tests/Helpers/D2D1TestRunner.cs b/tests/ComputeSharp.D2D1.Tests/Helpers/D2D1TestRunner.cs index 2e7de96e..919a763f 100644 --- a/tests/ComputeSharp.D2D1.Tests/Helpers/D2D1TestRunner.cs +++ b/tests/ComputeSharp.D2D1.Tests/Helpers/D2D1TestRunner.cs @@ -6,13 +6,10 @@ using ComputeSharp.D2D1.Interop; using ComputeSharp.Tests.Helpers; using Win32; using Win32.Graphics.Direct2D; - -#pragma warning disable IDE0065 +using D2D1_MAPPED_RECT = Win32.Graphics.Direct2D.MappedRect; namespace ComputeSharp.D2D1.Tests.Helpers; -using D2D1_MAPPED_RECT = MappedRect; - /// /// A test helper for D2D1 pixel shaders. /// diff --git a/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj b/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj index fed652d4..6edaa669 100644 --- a/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj +++ b/tests/ComputeSharp.Tests.DeviceLost/ComputeSharp.Tests.DeviceLost.csproj @@ -4,7 +4,6 @@ net472;netcoreapp3.1;net6.0;net7.0 false AnyCPU;x64;ARM64 - $(NoWarn);CA1416 diff --git a/tests/ComputeSharp.Tests.DeviceLost/DeviceDisposalTests.cs b/tests/ComputeSharp.Tests.DeviceLost/DeviceDisposalTests.cs index 477405a0..dcfb7041 100644 --- a/tests/ComputeSharp.Tests.DeviceLost/DeviceDisposalTests.cs +++ b/tests/ComputeSharp.Tests.DeviceLost/DeviceDisposalTests.cs @@ -7,8 +7,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Win32; using Win32.Graphics.Direct3D12; -#pragma warning disable IDE0065 - namespace ComputeSharp.Tests.DeviceLost; using Win32 = Win32.Apis; diff --git a/tests/ComputeSharp.Tests.DeviceLost/GetDefaultDeviceTests.cs b/tests/ComputeSharp.Tests.DeviceLost/GetDefaultDeviceTests.cs index c0a9bd1d..8fd0647d 100644 --- a/tests/ComputeSharp.Tests.DeviceLost/GetDefaultDeviceTests.cs +++ b/tests/ComputeSharp.Tests.DeviceLost/GetDefaultDeviceTests.cs @@ -4,14 +4,11 @@ using ComputeSharp.Tests.DeviceLost.Helpers; using Microsoft.VisualStudio.TestTools.UnitTesting; using Win32; using Win32.Graphics.Direct3D12; - -#pragma warning disable IDE0065 - -namespace ComputeSharp.Tests.DeviceLost; - using DXGI = Win32.Graphics.Dxgi.Apis; using HRESULT = Win32.HResult; +namespace ComputeSharp.Tests.DeviceLost; + [TestClass] [TestCategory("GetDefaultDevice")] public class GetDefaultDeviceTests diff --git a/tests/ComputeSharp.Tests.DeviceLost/Helpers/GraphicsDeviceHelper.cs b/tests/ComputeSharp.Tests.DeviceLost/Helpers/GraphicsDeviceHelper.cs index b99e8dc2..c27a3ccb 100644 --- a/tests/ComputeSharp.Tests.DeviceLost/Helpers/GraphicsDeviceHelper.cs +++ b/tests/ComputeSharp.Tests.DeviceLost/Helpers/GraphicsDeviceHelper.cs @@ -5,8 +5,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using Win32; using Win32.Graphics.Direct3D12; -#pragma warning disable IDE0065 - namespace ComputeSharp.Tests.DeviceLost.Helpers; using Win32 = Win32.Apis; diff --git a/tests/ComputeSharp.Tests.DisableDynamicCompilation/ComputeSharp.Tests.DisableDynamicCompilation.csproj b/tests/ComputeSharp.Tests.DisableDynamicCompilation/ComputeSharp.Tests.DisableDynamicCompilation.csproj index beceb489..a6298c32 100644 --- a/tests/ComputeSharp.Tests.DisableDynamicCompilation/ComputeSharp.Tests.DisableDynamicCompilation.csproj +++ b/tests/ComputeSharp.Tests.DisableDynamicCompilation/ComputeSharp.Tests.DisableDynamicCompilation.csproj @@ -4,7 +4,6 @@ net472;netcoreapp3.1;net6.0;net7.0 false AnyCPU;x64;ARM64 - $(NoWarn);CA1416 diff --git a/tests/ComputeSharp.Tests.GlobalStatements/ComputeSharp.Tests.GlobalStatements.csproj b/tests/ComputeSharp.Tests.GlobalStatements/ComputeSharp.Tests.GlobalStatements.csproj index 9aeadcfa..4bc77446 100644 --- a/tests/ComputeSharp.Tests.GlobalStatements/ComputeSharp.Tests.GlobalStatements.csproj +++ b/tests/ComputeSharp.Tests.GlobalStatements/ComputeSharp.Tests.GlobalStatements.csproj @@ -5,7 +5,6 @@ net472;net6.0;net7.0 AnyCPU;x64;ARM64 enable - $(NoWarn);CA1416 diff --git a/tests/ComputeSharp.Tests.Internals/ComputeSharp.Tests.Internals.csproj b/tests/ComputeSharp.Tests.Internals/ComputeSharp.Tests.Internals.csproj index e600fa9c..9a94155a 100644 --- a/tests/ComputeSharp.Tests.Internals/ComputeSharp.Tests.Internals.csproj +++ b/tests/ComputeSharp.Tests.Internals/ComputeSharp.Tests.Internals.csproj @@ -4,7 +4,6 @@ net472;netcoreapp3.1;net6.0;net7.0 false AnyCPU;x64;ARM64 - $(NoWarn);CA1416 diff --git a/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj b/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj index c7a556ff..5810d1f6 100644 --- a/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj +++ b/tests/ComputeSharp.Tests/ComputeSharp.Tests.csproj @@ -4,7 +4,6 @@ net472;netcoreapp3.1;net6.0;net7.0 false AnyCPU;x64;ARM64 - $(NoWarn);CA1416 diff --git a/tests/ComputeSharp.Tests/InteropServicesTests.cs b/tests/ComputeSharp.Tests/InteropServicesTests.cs index 5dbdf7d7..8057cb53 100644 --- a/tests/ComputeSharp.Tests/InteropServicesTests.cs +++ b/tests/ComputeSharp.Tests/InteropServicesTests.cs @@ -6,14 +6,12 @@ using ComputeSharp.Tests.Extensions; using Microsoft.VisualStudio.TestTools.UnitTesting; using Win32; using Win32.Graphics.Direct3D12; - -#pragma warning disable IDE0065 - -namespace ComputeSharp.Tests; - using D3D12_RESOURCE_DIMENSION = Win32.Graphics.Direct3D12.ResourceDimension; using HRESULT = Win32.HResult; using LUID = Win32.Luid; + +namespace ComputeSharp.Tests; + using Win32 = Win32.Apis; [TestClass] diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props index e190c8b2..6238d8f9 100644 --- a/tests/Directory.Build.props +++ b/tests/Directory.Build.props @@ -2,6 +2,14 @@ + + $(NoWarn);CS1591 + + + $(NoWarn);CA1416 + + + $(NoWarn);IDE0065 \ No newline at end of file