内部APIテストをTests.Internalsへ移動

このコミットが含まれているのは:
routersys committed 2026-07-17 08:38:29 +09:00
1 親 67af7b667b
コミット 3bff05366d
1ファイル変更
+31
+31
ファイルの表示
@@ -0,0 +1,31 @@
using System;
using ComputeSharp.Graphics.Commands.Interop;
using ComputeSharp.Tests.Attributes;
using ComputeSharp.Tests.Extensions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace ComputeSharp.Tests.Internals;
[TestClass]
public unsafe partial class DescriptorHandleAllocatorTests
{
[CombinatorialTestMethod]
[AllDevices]
public void DescriptorHandleAllocator_DefaultReturnIsIgnoredAndDuplicateReturnThrows(Device device)
{
ID3D12DescriptorHandleAllocator allocator = new(device.Get().D3D12Device);
try
{
allocator.Return(default);
allocator.Rent(out ID3D12ResourceDescriptorHandles handles);
allocator.Return(in handles);
_ = Assert.ThrowsExactly<InvalidOperationException>(() => allocator.Return(in handles));
}
finally
{
allocator.Dispose();
}
}
}