You can prevent coding errors by using C++Test’s Static Analysis feature to automatically enforce industry–wide and custom coding standards. These standards are designed to reduce the possibility of introducing errors, as well as increase code portability and maintainability. C++Test can automatically run every file though static analysis, then report coding violations within the C++Test GUI.
To immediately perform static analysis on cpptest_demo.cpp, simply choose the Static Analysis button in the C++Test tool bar (the Static Analysis button has a red wizard hat and wand eclipsed by a green arrow). C++Test automatically analyzes cpptest_demo.cpp for coding errors. Coding errors found are shown under the Static Analysis tab, in the Results sub–tab. All messages of the same type (that is, resulting from a violation of the same rule) are grouped into one branch. The root of this branch is the "description" node, indicated by a
wizard hat icon. The description node contains the number of messages under that rule, the type of violation (severe violation, possible severe violation, violation, possible violation, informa-tional), a description of the rule, and the rule number.