You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.
Been curious about how to write unit tests in C# for a while. I finally looked into it and it looks like there is no negative repercussion to including a test project in the DS4Windows solution. So far, I have written some simple test methods that test the MacroParser class. It would be better to add some more tests especially ones that would test parsing profiles.
It looks like I should have looked into using MSTest sooner.
Writing some small mock unit tests has unintentionally revealed a fairly substantial bug in the ProfileMigration class. Ever since DS4Windows 3.2, the ProfileMigration class has been broken as the wrong method was being used to attempt to extract the final XML. It would only return an empty string instead; I think I checked this before but whatever.
The profile XML spec has not really been updated since DS4Windows 2.1.15 according to my notes so this type of bug would likely only affect people trying to use a profile from the Jays2Kings build. That is what the test was attempting to perform. The Log would show a profile load failed message if that error would have occurred.
Been curious about how to write unit tests in C# for a while. I finally looked into it and it looks like there is no negative repercussion to including a test project in the DS4Windows solution. So far, I have written some simple test methods that test the MacroParser class. It would be better to add some more tests especially ones that would test parsing profiles.
It looks like I should have looked into using MSTest sooner.
Related issue
Ryochan7/DS4MapperTest#8
The text was updated successfully, but these errors were encountered: