From 279d7c372f378b664ba42123782404b07a7f7e4b Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Tue, 13 Aug 2019 13:10:57 +0200 Subject: [PATCH] Added GPU initialization tests --- tests/ComputeSharp.NetCore.Tests/MiscTests.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 tests/ComputeSharp.NetCore.Tests/MiscTests.cs diff --git a/tests/ComputeSharp.NetCore.Tests/MiscTests.cs b/tests/ComputeSharp.NetCore.Tests/MiscTests.cs new file mode 100644 index 00000000..76ba23c8 --- /dev/null +++ b/tests/ComputeSharp.NetCore.Tests/MiscTests.cs @@ -0,0 +1,17 @@ +using System; +using Microsoft.VisualStudio.TestTools.UnitTesting; + +namespace ComputeSharp.NetCore.Tests +{ + [TestClass] + [TestCategory("Misc")] + public class MiscTests + { + [TestMethod] + public void CheckIsSupportedAndGetDefaultDevice() + { + if (Gpu.IsSupported) Assert.IsNotNull(Gpu.Default); + else Assert.ThrowsException(() => Gpu.Default); + } + } +}