Skip to content

Commit

Permalink
Disable explicit version checking
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerszabo committed Apr 15, 2018
1 parent dece625 commit 9b30453
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GLedApiDotNet/RGBFusionMotherboardImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions GLedApiDotNetTests/Tests/RGBFusionMotherboardTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9b30453

Please sign in to comment.