pid-tests  0.1.1
Overview

pid-test provides tools to help writing unit tests using the Catch2 test framework

The main features of this package are:

Table of Contents

The PID_Test CMake function

The 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:

1 PID_Test(
2  <args for PID_Component>
3  [CATCH2_OPTIONS ...]
4  [TESTS title1/filter1 title2/filter2 ...]
5 )

In its most basic form, it can be a drop in replacement for PID_Component, e.g before:

1 PID_Component(
2  my-test
3  ...
4 )
5 
6 run_PID_Test(
7  NAME my-test
8  COMPONENT my-test
9 )

After:

1 PID_Test(
2  my-test
3  ...
4 )

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:

1 PID_Test(
2  my-test
3  ...
4  TESTS
5  "math functions/math" # use double quotes if spaces are present
6  utilities/utils*
7  system/[fork][exec]
8 )

For more information on how to write filter expressions please refer to the official documentation.

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.

About authors

pid-tests has been developed by following authors:

Please contact Benjamin Navarro (navar.nosp@m.ro@l.nosp@m.irmm..nosp@m.fr) - LIRMM / CNRS for more information or questions.