|
TTS v4.0.0
The Tiny Test System
|
Macros | |
| #define | TTS_CUSTOM_DRIVER_FUNCTION |
| Test application entry-point customization. | |
| #define | TTS_MAIN |
| Identify the file containing tests entry point. | |
Functions | |
| void | tts::initialize (int argc, char const **argv) |
| Initializes a TTS test suite. | |
| int | tts::report (counter fails, counter invalids) |
| Test reporting customization point. | |
| template<typename Handler> | |
| tts_implementation_defined | tts::set_abort_handler (Handler h) |
| Run termination customization point. | |
| #define TTS_CUSTOM_DRIVER_FUNCTION |
#include <tts/engine/main.hpp>
Test application entry-point customization.
In case where the main function is to be provided externally, one can redefine TTS_CUSTOM_DRIVER_FUNCTION in order to specify the name of the test executable entry point.
| #define TTS_MAIN |
#include <tts/engine/main.hpp>
Identify the file containing tests entry point.
Users can dispatch tests in multiple Translation Units to be linked afterward. In this scenario, one single Translation Unit must define TTS_MAIN to generate the test entry point function.
|
inline |
#include <tts/tools/options.hpp>
Initializes a TTS test suite.
This function is to be called when writing a custom entry point.
| argc | Number of command line argument fetched from main |
| argv | Command line arguments pointer fetched from main |
|
inline |
#include <tts/engine/environment.hpp>
Test reporting customization point.
Aggregates test results and validate the whole test suite with respect to expect numbers of failures and invalids.
| fails | Number of expected failures. |
| invalids | Number of expected invalid tests. |
|
inline |
#include <tts/engine/abort.hpp>
Run termination customization point.
Runs just before TTS exits a crashed or timed out run, with the signal that brought it down or 0 when nothing did. TTS exits once it returns, with 1, or with 0 when the case that brought the run down was tagged TTS_XFAIL or TTS_MAYFAIL.
Useful when a test binary has to handle an abrupt stop in its own way.
| h | Any callable taking an int. |