Monday, December 10, 2018

Writing the GController unit tests and beginning Windows implementation

 12/10/2018

Month 2, Week 3

Author: Devin Wright

  
    The goal of this week was to write out the manual unit test for GController. The unit test are used to test the methods of the Interface to ensure that the correct results are received. This includes passing invalid arguments to see if the method can handle them without crashing. Currently the unit test are lacking since they currently rely on the use of a physical controller. This mainly prevents having dynamic connection test where controllers can be added and removed in a specific order. For testing the results of the input and connection methods when a disconnection happens. This will be possible to add later down the road when I find a way simulate a controller on Windows.

   At this point I have been implementing the Windows portion of the GController library and it currently passes all but the event based unit tests as there is currently nothing in place to send the events to the registered listeners. This is simple to do however, since all future implementations have to do this as well I am trying to find the best way to abstract the process into a function that will be to handle the events based on the Controller_States ( a struct that holds the input data and connection status). After, setting up the event system I will go through and clean up my code while making sure all my memory is cleaned up and that all the methods are thread safe.