Added new test for static members in class hierarchy
このコミットが含まれているのは:
1 親
4001c60566
コミット
8b01e4f90c
1ファイル変更
+16
@@ -143,5 +143,21 @@ namespace ComputeSharp.Tests
|
||||
Assert.IsTrue(MathF.Abs(result[0] - expected[0]) < 0.0001f);
|
||||
Assert.IsTrue(MathF.Abs(result[1] - expected[1]) < 0.0001f);
|
||||
}
|
||||
|
||||
public static int SomeNumber = 7;
|
||||
|
||||
[TestMethod]
|
||||
public void StaticLocalScalarFieldAssignToBuffer()
|
||||
{
|
||||
using ReadWriteBuffer<int> buffer = Gpu.Default.AllocateReadWriteBuffer<int>(1);
|
||||
|
||||
Action<ThreadIds> action = id => buffer[0] = SomeNumber;
|
||||
|
||||
Gpu.Default.For(1, action);
|
||||
|
||||
int[] result = buffer.GetData();
|
||||
|
||||
Assert.IsTrue(result[0] == SomeNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
新しいイシューから参照
ユーザーをブロックする