From 9b304530c3949c10dcd413e97ab860bedb9347d0 Mon Sep 17 00:00:00 2001 From: Tyler Szabo Date: Sat, 14 Apr 2018 18:05:13 -0700 Subject: [PATCH] Disable explicit version checking --- GLedApiDotNet/RGBFusionMotherboardImpl.cs | 4 ++-- GLedApiDotNetTests/Tests/RGBFusionMotherboardTests.cs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/GLedApiDotNet/RGBFusionMotherboardImpl.cs b/GLedApiDotNet/RGBFusionMotherboardImpl.cs index e84830f..6c1f811 100644 --- a/GLedApiDotNet/RGBFusionMotherboardImpl.cs +++ b/GLedApiDotNet/RGBFusionMotherboardImpl.cs @@ -124,9 +124,9 @@ internal RGBFusionMotherboard(Raw.GLedAPIv1_0_0Wrapper wrapperAPI) api = wrapperAPI; string ver = api.GetSdkVersion(); - if (!("1.0.0".Equals(ver))) + if (string.IsNullOrEmpty(ver)) { - throw new GLedAPIException(string.Format("Unknown API version {0}. Expected 1.0.0", ver)); + throw new GLedAPIException(string.Format("GLedApi returned empty version")); } api.Initialize(); diff --git a/GLedApiDotNetTests/Tests/RGBFusionMotherboardTests.cs b/GLedApiDotNetTests/Tests/RGBFusionMotherboardTests.cs index 3729414..182db95 100644 --- a/GLedApiDotNetTests/Tests/RGBFusionMotherboardTests.cs +++ b/GLedApiDotNetTests/Tests/RGBFusionMotherboardTests.cs @@ -37,6 +37,7 @@ public void TestBadDivisions() new RGBFusionMotherboard(new GLedApiDotNet.Raw.GLedAPIv1_0_0Wrapper(mock)); } + [Ignore] // This test is disabled until more rigorous version checking is implemented. [TestMethod] [ExpectedException(typeof(GLedAPIException))] public void TestBadVersion()