- the micro-framework, named libunit.a, is designed to facilitate the execution of a series of tests on various functions in a structured and efficient manner
The framework allows for the execution of multiple tests sequentially, ensuring that each test runs in its own separate process. This isolation helps in accurately capturing the results and any potential errors that may occur during execution.
Each test is stored in a list or array, identified by a specific name. This organization allows for easy management and retrieval of tests. The framework will output the name of the function being tested along with the name of each test and its corresponding result.
After each test execution, the framework captures the result and reports it in a standardized format:
- OK: Test succeeded.
- KO: Test failed.
- SIGSEGV: Segmentation Fault detected.
- SIGBUS: Bus Error detected.
- the output format will be: [test_function]:[test_name]:[status]
At the end of the test execution, the framework will display the total number of tests run and the count of successful tests. If all tests pass, the program will exit with a return value of 0; if any test fails, it will return -1.