Use dotnet run for ComputeSharp.Tests.GlobalStatements

このコミットが含まれているのは:
Sergio Pedri committed 2023-09-06 21:03:10 +02:00
1 親 9bb2c676ce
コミット baa2c75cbb
3ファイル変更
+6 -10

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

+1 -1
ファイルの表示
@@ -89,7 +89,7 @@ jobs:
- name: Run ComputeSharp.Tests.DisableDynamicCompilation
run: dotnet test tests\ComputeSharp.Tests.DisableDynamicCompilation\ComputeSharp.Tests.DisableDynamicCompilation.csproj -c Release -f ${{matrix.framework}} /p:Platform=x64 -v n -l "console;verbosity=detailed"
- name: Run ComputeSharp.Tests.GlobalStatements
run: dotnet test tests\ComputeSharp.Tests.GlobalStatements\ComputeSharp.Tests.GlobalStatements.csproj -c Release -f ${{matrix.framework}} /p:Platform=x64 -v n -l "console;verbosity=detailed"
run: dotnet run --project tests\ComputeSharp.Tests.GlobalStatements\ComputeSharp.Tests.GlobalStatements.csproj -c Release -f ${{matrix.framework}} /p:Platform=x64 -v n -l "console;verbosity=detailed"
- name: Run ComputeSharp.Tests.Internals
run: dotnet test tests\ComputeSharp.Tests.Internals\ComputeSharp.Tests.Internals.csproj -c Release -f ${{matrix.framework}} /p:Platform=x64 -v n -l "console;verbosity=detailed"
@@ -5,10 +5,6 @@
<Platforms>AnyCPU;x64;ARM64</Platforms>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\ComputeSharp.Core\ComputeSharp.Core.csproj" />
+5 -5
ファイルの表示
@@ -1,5 +1,4 @@
using ComputeSharp;
using Microsoft.VisualStudio.TestTools.UnitTesting;
float[] numbers = Enumerable.Range(0, 128).Select(i => (float)i).ToArray();
@@ -15,11 +14,12 @@ foreach (ref float number in numbers.AsSpan())
float[] result = buffer.ToArray();
CollectionAssert.AreEqual(
expected: numbers,
actual: result);
if (!numbers.SequenceEqual(result))
{
throw new Exception("The processed buffer does not match the expected results.");
}
Console.WriteLine("Test passed successfully");
Console.WriteLine("Test passed successfully!");
// See https://github.com/Sergio0694/ComputeSharp/issues/374
[ShaderMethod]