![]() |
GM6000 Digital Heater Controller Branch: main
SDX-1330
|
This class provides methods to access the unit testing support for the Cpl::System::Shutdown interface. More...
This class provides methods to access the unit testing support for the Cpl::System::Shutdown interface.
This class provides an implementation of Shutdown interface that has the ability to count the number times the Shutdown interface is/was called instead of exiting. It can also alter the application's exit code.
Notes: o The Shutdown implementation assumes/uses the C Library 'exit()' method.
#include <Shutdown_TS.h>
Static Public Member Functions | |
static void | clearAndUseCounter (void) |
This method zero's the exit counter and sets the shutdown behavior to NOT exit when called - only count the calls. | |
static size_t | getAndClearCounter (void) |
This method returns the current call count AND clears the call counter. | |
static void | setExitCode (int new_exit_code) |
This method allows the application to exit - but always with the specified 'new_exit_code' (i.e. | |
static void | restore (void) |
This method restores the exit/shutdown behavior to its 'non-test' paradigm. | |
|
static |
This method zero's the exit counter and sets the shutdown behavior to NOT exit when called - only count the calls.
Note: This interface starts in the 'counter mode' with the count set to zero.
|
static |
This method returns the current call count AND clears the call counter.
|
static |
This method restores the exit/shutdown behavior to its 'non-test' paradigm.
|
static |
This method allows the application to exit - but always with the specified 'new_exit_code' (i.e.
ignoring the application supplied exit code). This method is helpful during unit testing for 'passing' and exit/failure use case.