micro-test-plus 6.0.0
µTest++ Testing Framework
Loading...
Searching...
No Matches

How to write the tests. More...

Topics

 Test runners
 The runner initialises the framework and returns the exit code.
 Test suites
 Test suites are named groups of related test cases.
 Test cases
 Test cases are named sequences of checks.
 Expectations
 Expectations are checks whose outcomes are counted and reported.
 Requirements
 Requirements are checks that stop the test case when they fail.
 Function comparators
 Functions for comparing actual and expected values in tests.
 Logical functions
 Functions used to compose logical expressions in tests.
 Checking exceptions
 Functions for verifying exceptions in test cases.
 Utility functions
 Utility functions for handling strings in tests.
 Customisation
 Reporting the application types, and writing application comparators.
 Deprecated
 Definitions kept for compatibility with earlier releases.

Detailed Description

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

Main C++ header with the declarations for the µTest++ Testing Framework.
Primary namespace for the µTest++ testing framework.

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.