May 2020
Intermediate to advanced
496 pages
13h 54m
English
Since the iLed interface isn't directly reliant on any hardware, it is extremely easy to push alternative implementations to ledTask. Rather than passing in one of the actual hardware implementations for iLed, we could pass in anything we like to either LedTaskInit (for integration-level tests) or ledTask (for unit tests). The implementations, in these cases, would likely set variables in the testing environment when called. For example, On could set a Boolean to TRUE when called and Off could set the same Boolean to FALSE. These types of tests can be used to verify the logic of the task, without requiring any hardware at all, provided a compiler and an alternative environment is set up on the development machine. FreeRTOS ...