Page tree

Skip to end of metadata
Go to start of metadata

C++test provides macros for controlling how source code test results are collected and validated; the available macros and routines are defined in the following interfaces:

  • Registration: Defines test case registration macros. Within the test suite declaration, each test case is "registered" with a macro of the form CPPTEST_TEST*. For example, CPPTEST_TEST, CPPTEST_TEST_EXCEPTION, CPPTEST_TEST_ERROR, CPPTEST_TEST_FAIL. If a test case that is registered using CPPTEST_TEST_FAIL(), CPPTEST_TEST_ERROR() or CPPTEST_TEST_EXCEPTION() does not produce expected result, C++test reports a test case failure.
  • Test Case API: Defines macros that can be used in the test case code (for instance, to validate results). Note that the available C++test assertion macros are similar to CppUnit macros; however, the C++test macro names are prepended with CPPTEST_ (instead of CPPUNIT_).

For information on these macros, see C++test API Documentation.

  • No labels