Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
}

Image Modified



Line Coverage

...

MC/DC conforms to the international technical standard DO-178B/C (RTCA), which specifies the software certification criteria for mission-critical equipment and systems within the aviation industry. This includes real time embedded systems.

According to the DO-178B/C standard, the following three conditions must be satisfied to obtain complete (100%) MC/DC coverage:

...

C++test will report the MC/DC coverage for such an example to be 67% [2/3 conditions covered]. You can see the actual values that the conditions and decision evaluated to in a tool tip by placing your cursor above on the condition.


Image Modified

Simple Condition Coverage

...