|
TTS v4.1.0
The Tiny Test System
|
Macros | |
| #define | TTS_CUSTOM_DRIVER_FUNCTION |
| Names the function that runs the tests when main comes from elsewhere. | |
| #define | TTS_MAIN |
| Defines the entry point of the test program in the translation unit that defines it. | |
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>
Names the function that runs the tests when main comes from elsewhere.
A program that writes its own main defines TTS_MAIN and TTS_CUSTOM_DRIVER_FUNCTION before including tts/tts.hpp. Its main calls tts::initialize, the function of that name with argc and argv, then tts::report.
| #define TTS_MAIN |
#include <tts/engine/main.hpp>
Defines the entry point of the test program in the translation unit that defines it.
A program split over several translation units defines TTS_MAIN in a single unit, before including tts/tts.hpp.
|
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. |