Advanced Stuff

Customize CHECK_EQUAL to work with your types that support operator==()

Create the function

        SimpleString StringFrom (const yourType&)

The Extensions directory has a few of these.

Building default checks with TestPlugin

  • CppUTest can support extra checking functionality by inserting TestPlugins
  • TestPlugin is derived from the TestPlugin class and can be inserted in the
    TestRegistry via the installPlugin method.
  • All TestPlugins are called before and after running all tests and before and
    after running a single test (like Setup and Teardown). TestPlugins are typically
    inserted in the main.
  • TestPlugins can be used for, for example, system stability and resource handling
    like files, memory or network connection clean-up.
  • In CppUTest, the memory leak detection is done via a default enabled TestPlugin