|
pid-tests
0.3.5
|
pid-test provides tools to help writing unit tests using the Catch2 test framework
The main features of this package are:
pid-tests component that provides a precompiled main function for the Catch2 test framework and, optionally, the deamonize library if available. More info on the pid-tests component herePID_Test CMake function that simplify the declaration of unit tests, available as long as a package dependency to pid-tests existsThe PID_Test function wraps the calls to PID_Component and run_PID_Test and is tailored for Catch2-based unit tests.
It also automatically link the test component with pid-tests so you don't have to do it yourself.
The function has the following signature:
In its most basic form, it can be a drop in replacement for PID_Component, e.g before:
After:
But since Catch2 provides test filtering, it might be desirable to run multiple tests on the same component, selecting the parts to run with filter expressions.
To achieve this, you must describe each run with a title and a filter in the form title/filter and pass them to the TESTS argument, e,g:
For more information on how to write filter expressions please refer to the official documentation.
If you wish to enable sanitizers for a specific test, you can pass them to the SANITIZERS options. These sanitizers will override the ones enabled in the project's CMake options (e.g SANITIZE_ADDRESS) for this test.
The license that applies to the whole package content is CeCILL. Please look at the license.txt file at the root of this repository for more details.
pid-tests has been developed by following authors:
Please contact Robin Passama (navarro@lirmm.fr) - LIRMM / CNRS for more information or questions.