From 30c5b77ec14b05374e8bde44da7e307b08caf40a Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Wed, 17 Aug 2022 14:46:39 +0200 Subject: [PATCH] Use raw string literal in ShaderCompilerTests --- .../ShaderCompilerTests.cs | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/tests/ComputeSharp.Tests.Internals/ShaderCompilerTests.cs b/tests/ComputeSharp.Tests.Internals/ShaderCompilerTests.cs index b7744888..b7dc4591 100644 --- a/tests/ComputeSharp.Tests.Internals/ShaderCompilerTests.cs +++ b/tests/ComputeSharp.Tests.Internals/ShaderCompilerTests.cs @@ -11,24 +11,25 @@ namespace ComputeSharp.Tests.Internals; [TestCategory("ShaderCompiler")] public class ShaderCompilerTests { - private const string ShaderSource = @" - cbuffer _ : register(b0) - { - uint __x; - uint __y; - uint __z; - } - - RWStructuredBuffer buffer : register(u0); - - [NumThreads(32, 1, 1)] - void Execute(uint3 ids : SV_DispatchThreadId) - { - if (ids.x < __x && ids.y < __y && ids.z < __z) + private const string ShaderSource = """ + cbuffer _ : register(b0) { - buffer[ids.x] *= 2; + uint __x; + uint __y; + uint __z; } - }"; + + RWStructuredBuffer buffer : register(u0); + + [NumThreads(32, 1, 1)] + void Execute(uint3 ids : SV_DispatchThreadId) + { + if (ids.x < __x && ids.y < __y && ids.z < __z) + { + buffer[ids.x] *= 2; + } + } + """; [TestMethod] public void CompileTest_Ok()