Restore <TreatWarningsAsErrors> and fix warnings

このコミットが含まれているのは:
Sergio Pedri committed 2021-11-20 16:48:18 +01:00
1 親 ec901922db
コミット d8a4a7412d
25ファイル変更
+49 -35

検索条件に一致するファイルはありません

+1 -1
ファイルの表示
@@ -13,7 +13,7 @@ public class NativeLibrariesResolverTests
/// <summary>
/// Performs static initialization for the assembly before any unit tests are run.
/// </summary>
/// <param name="context">The <see cref="TestContext"/> for the test runner instance in use.</param>
/// <param name="_">The <see cref="TestContext"/> for the test runner instance in use.</param>
[AssemblyInitialize]
public static void Initialize(TestContext _)
{
+1 -2
ファイルの表示
@@ -1404,8 +1404,7 @@ public class DiagnosticsTests
/// </summary>
/// <typeparam name="TGenerator">The generator type to use.</typeparam>
/// <param name="source">The input source to process.</param>
/// <param name="index">The target index to check in the resulting output.</param>
/// <param name="expectedBody">The expected body to compare with the generated code.</param>
/// <param name="diagnosticsIds">The expected diagnostics ids to be generated.</param>
private static void VerifyGeneratedDiagnostics<TGenerator>(string source, params string[] diagnosticsIds)
where TGenerator : class, ISourceGenerator, new()
{
+1 -1
ファイルの表示
@@ -3,7 +3,7 @@
namespace ComputeSharp.Tests.Attributes;
/// <summary>
/// An attribute to use with <see cref="CombinatorialAttribute"/> adding additional arbitrary input data.
/// An attribute to use with <see cref="CombinatorialTestMethodAttribute"/> adding additional arbitrary input data.
/// </summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public sealed class AdditionalDataAttribute : Attribute
+1 -1
ファイルの表示
@@ -3,7 +3,7 @@
namespace ComputeSharp.Tests.Attributes;
/// <summary>
/// An attribute to use with <see cref="CombinatorialAttribute"/> targeting an additional specific resource type.
/// An attribute to use with <see cref="CombinatorialTestMethodAttribute"/> targeting an additional specific resource type.
/// </summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public sealed class AdditionalResourceAttribute : Attribute
+1 -1
ファイルの表示
@@ -3,7 +3,7 @@
namespace ComputeSharp.Tests.Attributes;
/// <summary>
/// An attribute to use with <see cref="CombinatorialAttribute"/> targeting all supported devices.
/// An attribute to use with <see cref="CombinatorialTestMethodAttribute"/> targeting all supported devices.
/// </summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public sealed class AllDevicesAttribute : Attribute
+1 -1
ファイルの表示
@@ -3,7 +3,7 @@
namespace ComputeSharp.Tests.Attributes;
/// <summary>
/// An attribute to use with <see cref="CombinatorialAttribute"/> adding arbitrary input data.
/// An attribute to use with <see cref="CombinatorialTestMethodAttribute"/> adding arbitrary input data.
/// </summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public sealed class DataAttribute : Attribute
+1 -1
ファイルの表示
@@ -4,7 +4,7 @@ using ComputeSharp.Tests.Extensions;
namespace ComputeSharp.Tests.Attributes;
/// <summary>
/// An attribute to use with <see cref="CombinatorialAttribute"/> adding a specific <see cref="Extensions.Device"/> input.
/// An attribute to use with <see cref="CombinatorialTestMethodAttribute"/> adding a specific <see cref="Extensions.Device"/> input.
/// </summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public sealed class DeviceAttribute : Attribute
+1 -1
ファイルの表示
@@ -3,7 +3,7 @@
namespace ComputeSharp.Tests.Attributes;
/// <summary>
/// An attribute to use with <see cref="CombinatorialAttribute"/> targeting a specific resource type.
/// An attribute to use with <see cref="CombinatorialTestMethodAttribute"/> targeting a specific resource type.
/// </summary>
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public sealed class ResourceAttribute : Attribute
+3 -2
ファイルの表示
@@ -266,6 +266,7 @@ public static class GraphicsDeviceExtensions
/// <typeparam name="T">The type of items in the texture.</typeparam>
/// <param name="device">The target <see cref="GraphicsDevice"/> instance to allocate the texture for.</param>
/// <param name="type">The type of texture to allocate.</param>
/// <param name="data">The input 3D array to use as source data for the texture.</param>
/// <returns>A <see cref="Texture2D{T}"/> instance of the requested size.</returns>
[Pure]
public static Texture3D<T> AllocateTexture3D<T>(this GraphicsDevice device, Type type, T[,,] data)
@@ -309,7 +310,7 @@ public static class GraphicsDeviceExtensions
/// <param name="textureType">The type of texture to allocate.</param>
/// <param name="inputType">The type of filepath to use.</param>
/// <param name="filename">The filename of the image file to load and decode into the texture.</param>
/// <returns>A <see cref="Texture2D{T, TPixel}"/> instance with the contents of the specified file.</returns>
/// <returns>A <see cref="Texture2D{T}"/> instance with the contents of the specified file.</returns>
[Pure]
public static Texture2D<T> LoadTexture2D<T, TPixel>(this GraphicsDevice device, Type textureType, Type inputType, string filename)
where T : unmanaged, IUnorm<TPixel>
@@ -341,7 +342,7 @@ public static class GraphicsDeviceExtensions
/// <param name="device">The <see cref="GraphicsDevice"/> instance to use to allocate the texture.</param>
/// <param name="type">The type of texture to allocate.</param>
/// <param name="buffer">The buffer with the image data to load and decode into the texture.</param>
/// <returns>A <see cref="Texture2D{T, TPixel}"/> instance with the contents of the specified file.</returns>
/// <returns>A <see cref="Texture2D{T}"/> instance with the contents of the specified file.</returns>
[Pure]
public static Texture2D<T> LoadTexture2D<T, TPixel>(this GraphicsDevice device, Type type, byte[] buffer)
where T : unmanaged, IUnorm<TPixel>
+1 -1
ファイルの表示
@@ -18,7 +18,7 @@ public static class ImagingExtensions
/// Creates a new <see cref="Image{TPixel}"/> instance with the specified texture data.
/// </summary>
/// <typeparam name="TFrom">The input pixel format used in the texture.</typeparam>
/// <typeparam name="To">The target pixel format for the returned image.</typeparam>
/// <typeparam name="TTo">The target pixel format for the returned image.</typeparam>
/// <param name="texture">The source <see cref="Texture2D{T}"/> instance to read data from.</param>
/// <returns>An image with the data from the input texture.</returns>
[Pure]
+2 -2
ファイルの表示
@@ -136,7 +136,6 @@ public class ShadersTests
/// <summary>
/// Executes a given test for a specified shader.
/// </summary>
/// <typeparam name="T">The type of shader to test.</typeparam>
/// <param name="device">The device to use.</param>
/// <param name="shaderType">The type of shader being executed.</param>
/// <param name="delta">The comparison delta.</param>
@@ -194,7 +193,8 @@ public class ShadersTests
/// <summary>
/// Executes a given test for a specified shader.
/// </summary>
/// <typeparam name="T">The type of shader to test.</typeparam>
/// <typeparam name="TCompute">The type of compute shader to test.</typeparam>
/// <typeparam name="TPixel">The type of pixel shader to test.</typeparam>
/// <param name="device">The device to use.</param>
/// <param name="shaderType">The type of shader being executed.</param>
/// <param name="computeFactory">The factory of compute shaders.</param>
+7
ファイルの表示
@@ -0,0 +1,7 @@
<Project>
<Import Project="..\Directory.Build.props" />
<PropertyGroup>
<NoWarn>$(NoWarn);CS1591</NoWarn>
</PropertyGroup>
</Project>