Add test for CS0649 suppressor for D2D1 resource textures
このコミットが含まれているのは:
1 親
44bf98cfa0
コミット
15c0201325
1ファイル変更
+18
+18
@@ -0,0 +1,18 @@
|
||||
namespace ComputeSharp.D2D1.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// A test class for the diagnostic suppressor for D2D1 resource texture fields being left uninitialized.
|
||||
/// </summary>
|
||||
internal sealed partial class D2D1ResourceTextureUninitializedFieldDiagnosticSuppressorTests
|
||||
{
|
||||
public readonly partial struct MyShader : ID2D1PixelShader
|
||||
{
|
||||
// This test just needs to validate the project builds fine with this shader.
|
||||
// If the diagnostic suppressor wasn't working, it'd fail to build because
|
||||
// Roslyn would emit a CS0649 warning, which would be treated as an error.
|
||||
[D2DResourceTextureIndex(0)]
|
||||
private readonly D2D1ResourceTexture1D<float4> texture;
|
||||
|
||||
public float4 Execute() => texture[0];
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする