PicoTest
A minimalist unit testing framework for C programs
|
This file provides a fully functional test runner and hooks for picotest suites. More...
#include <picotest.h>
Macros | |
#define | PICOTEST_MAINSUITE |
Defining PICOTEST_MAINSUITE before including picotestRunner.inc will define the main() function with standard option parsing and run the provided test suite. |
This file provides a fully functional test runner and hooks for picotest suites.
It's the easiest way to add PicoTest support to a new or existing project with minimal effort. See PicoTest's own test suite for an example of how to do it.
That's it!
The generated executable expects the following command line arguments:
If the leading argument starts with -, it is interpreted as an option; the remaining arguments provide the test names to execute.
Options are mutually exclusive.
Test lists:
Test output:
This file is public domain.
Copyright (c) 2025 Frederic Bonnet
#define PICOTEST_MAINSUITE |
Defining PICOTEST_MAINSUITE before including picotestRunner.inc will define the main() function with standard option parsing and run the provided test suite.
Only do it once per executable.