...
For details on configuring, generating, and reviewing reports, see Reviewing ResultsResults#Review_res.
Understanding Coverage Types
Anchor | ||||
---|---|---|---|---|
|
...
Code Block |
---|
class A { public: A() {} A(const A&) {} A(int val) {} A& foo() { return *this; } ~A() {} }; void funcA(const A& a) {} A& operator+(const A & a, const A & b) {} void defaultConstructorCall() { A objA; // Default constructor call - not included A objArr[10]; // Default constructor calls - not included A objB = objA; // Copy constructor call - not included A objC = 10; // Implicit call of A(int) constructor - not included funcA(10); // Implicit call of A(int) constructor - not included A res = objA + objA; // Operator + call - not included // Copy constructor call - not included A* objD = new A(); // Default constructor call - not included // Operator new call - not included delete objD; // Destructor call - not included // Operator new call - not included A* objE = new A[10]; // Default constructor calls - not included // Operator new call - not included delete[] objE; // Destructor calls - not included // Implicit destructor calls - not included } |
Line Coverage
Indicates how many executable lines of source code were reached by the control flow at least once. Complete, 100% line coverage is obtained if all executable lines are reached at least once.
...
Since loops introduce an unbounded number of paths, this measure considers only a limited number of looping possibilities. C/C++test considers two possibilities for while-loops and for-loops: zero and at least one repetition.
Execution paths resulting from special situations such as signals or exceptions thrown from functions called are not included in the set of possible execution paths. If such paths actually occur in the run time, they are counted and reported as "unexpected" ones.
In the source editor, C/C++test highlights one path at a time. To view a path in the source code editor, double-click on the appropriate function node in the Coverage view. To navigate between paths for the function, use the Highlight next element and Highlight previous element buttons in the Coverage view toolbar.
...