Use collection expressions in more places

このコミットが含まれているのは:
Sergio Pedri committed 2023-12-08 12:54:21 +01:00
1 親 95a1ecd5c4
コミット 058db06971
13ファイル変更
+33 -33

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

+1 -1
ファイルの表示
@@ -1830,7 +1830,7 @@ public class Test_D2DPixelShaderSourceGenerator
// Create the original compilation
CSharpCompilation compilation = CSharpCompilation.Create(
"original",
new SyntaxTree[] { sourceTree },
[sourceTree],
metadataReferences,
new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, allowUnsafe: true));
+8 -8
ファイルの表示
@@ -101,14 +101,14 @@ namespace ComputeSharp.D2D1.Tests
{
CollectionAssert.AreEqual(new[]
{
D2D1PixelShaderInputType.Simple,
D2D1PixelShaderInputType.Complex,
D2D1PixelShaderInputType.Simple,
D2D1PixelShaderInputType.Complex,
D2D1PixelShaderInputType.Complex,
D2D1PixelShaderInputType.Complex,
D2D1PixelShaderInputType.Simple
}, D2D1PixelShader.GetInputTypes<ShaderWithMultipleInputs>().ToArray());
D2D1PixelShaderInputType.Simple,
D2D1PixelShaderInputType.Complex,
D2D1PixelShaderInputType.Simple,
D2D1PixelShaderInputType.Complex,
D2D1PixelShaderInputType.Complex,
D2D1PixelShaderInputType.Complex,
D2D1PixelShaderInputType.Simple
}, D2D1PixelShader.GetInputTypes<ShaderWithMultipleInputs>().ToArray());
}
[TestMethod]
+1 -1
ファイルの表示
@@ -1574,7 +1574,7 @@ public class DiagnosticsTests
// Create the original compilation
CSharpCompilation compilation = CSharpCompilation.Create(
"original",
new SyntaxTree[] { sourceTree },
[sourceTree],
metadataReferences,
new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, allowUnsafe: true));
+1 -1
ファイルの表示
@@ -920,7 +920,7 @@ public class Test_ComputeShaderDescriptorGenerator
// Create the original compilation
CSharpCompilation compilation = CSharpCompilation.Create(
"original",
new SyntaxTree[] { sourceTree },
[sourceTree],
metadataReferences,
new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, allowUnsafe: true));
+2 -2
ファイルの表示
@@ -180,7 +180,7 @@ public class ShadersTests
Action<ReadWriteTexture2D<Rgba32, float4>> action = new(RunComputeShader<SwapChain.Shaders.Compute.ColorfulInfinity>);
_ = action.Method.GetGenericMethodDefinition().MakeGenericMethod(shaderType).Invoke(null, new[] { texture });
_ = action.Method.GetGenericMethodDefinition().MakeGenericMethod(shaderType).Invoke(null, [texture]);
}
else
{
@@ -196,7 +196,7 @@ public class ShadersTests
Action<ReadWriteTexture2D<Rgba32, float4>> action = new(RunPixelShader<ColorfulInfinity>);
_ = action.Method.GetGenericMethodDefinition().MakeGenericMethod(shaderType).Invoke(null, new[] { texture });
_ = action.Method.GetGenericMethodDefinition().MakeGenericMethod(shaderType).Invoke(null, [texture]);
}
_ = image.DangerousTryGetSinglePixelMemory(out Memory<ImageSharpRgba32> memory);