User-defined test cases can often be defined by modifying automatically-generated test cases.

To modify an existing test case:

  1. In the Test Case Explorer or in the project tree, locate the test suite file that C++test generated.
  2. Double-click the node that represents the generated test class you want to modify. The generated test class file will open in an editor.
  3. Modify the test case as needed. You can...
      • The Content Assist feature help you add macros and postconditions. For instance, to add a postcondition template, type CPPTEST_POST_CONDITION, place your cursor after the N, press Ctrl + Space, then select the desired postcondition. To add an assertion template, type CPPTEST_ASSERT, place your cursor after the T, press Ctrl + Space, then select the desired assertion. Be sure to customize the added templates.

     4. Save the modified file.