Skip to main content

C++ API

How to write the tests. More...

Topics Index​

 Test runners

The runner initialises the framework and returns the exit code. More...

 Test suites

Test suites are named groups of related test cases. More...

 Test cases

Test cases are named sequences of checks. More...

 Expectations

Expectations are checks whose outcomes are counted and reported. More...

 Requirements

Requirements are checks that stop the test case when they fail. More...

 Function comparators

Functions for comparing actual and expected values in tests. More...

 Logical functions

Functions used to compose logical expressions in tests. More...

 Checking exceptions

Functions for verifying exceptions in test cases. More...

 Utility functions

Utility functions for handling strings in tests. More...

 Customisation

Reporting the application types, and writing application comparators. More...

 Deprecated

Definitions kept for compatibility with earlier releases. More...

Description​

How to write the tests.

All the definitions are in the micro_os_plus::micro_test_plus namespace, which the examples shorten with an alias:

The topics follow the structure of a test program:

  • the runner, which starts and ends the session;
  • the suites, which group the test cases;
  • the test cases, which hold the checks;
  • the checks: the expectations, which are counted, and the requirements, which also stop the test case when they fail;
  • the conditions of the checks: the function comparators, the logical functions, and the exception checks;
  • the string utilities;
  • the customisation, for the application types and comparators;
  • the deprecated definitions, kept for the existing tests.

Generated via doxygen2docusaurus 2.2.8 by Doxygen 1.18.0.