Example of CTC++ Execution Profile Listing / Decision Coverage View

*****************************************************************************
*           CTC++, Test Coverage Analyzer for C/C++, Version 9.0            *
*                                                                           *
*                         EXECUTION PROFILE LISTING                         *
*                                                                           *
*                    Copyright (c) 1993-2013 Testwell Oy                    *
*             Copyright (c) 2013-2018 Verifysoft Technology GmbH            *
*****************************************************************************

Symbol file(s) used   : MON.sym (Fri May 04 09:56:54 2018)
Data file(s) used     : MON.dat (Fri May 04 09:57:15 2018)
Listing produced at   : Fri May 04 10:01:58 2018
Coverage view         : Reduced to decision coverage
 
MONITORED SOURCE FILE : F:\ctcwork\v90\doc\examples\prime.c
INSTRUMENTATION MODE  : multicondition
 HITS/TRUE      FALSE    LINE DESCRIPTION
=============================================================================
         1                  8 FUNCTION main()
         3          1      12   while (( prime_candidate = io_ask ( ) ) > 0)
         2          1      14     if (is_prime ( prime_candidate ))
                           15     }+
                           16     else
                           17     }+
                           18   }+
         1                 19   return 0
                           20 }
***TER 100 % (  6/  6) of FUNCTION main()
       100 % (  6/  6) statement
-----------------------------------------------------------------------------

***TER 100 % (  6/  6) of FILE F:\ctcwork\v90\doc\examples\prime.c
       100 % (  6/  6) statement
-----------------------------------------------------------------------------
 
MONITORED SOURCE FILE : F:\ctcwork\v90\doc\examples\io.c
INSTRUMENTATION MODE  : multicondition
 HITS/TRUE      FALSE    LINE DESCRIPTION
=============================================================================
         4                  5 FUNCTION io_ask()
         0          4 -    11   if (( amount = scanf ( "%u" , & val ) ) <= 0)
                           13   }+
         4                 14   return val
                           15 }
***TER  75 % (  3/  4) of FUNCTION io_ask()
        83 % (  5/  6) statement
-----------------------------------------------------------------------------
         3                 18 FUNCTION io_report()
         3                 21 }
***TER 100 % (  2/  2) of FUNCTION io_report()
       100 % (  1/  1) statement
-----------------------------------------------------------------------------

***TER  83 % (  5/  6) of FILE F:\ctcwork\v90\doc\examples\io.c
        86 % (  6/  7) statement
-----------------------------------------------------------------------------
 
MONITORED SOURCE FILE : F:\ctcwork\v90\doc\examples\calc.c
INSTRUMENTATION MODE  : multicondition
 HITS/TRUE      FALSE    LINE DESCRIPTION
=============================================================================
         3                  4 FUNCTION is_prime()
         1          2       8   if (val == 1 || val == 2 || val == 3)
         1                  9     return 1
                            9   }+
         1          1      10   if (val % 2 == 0)
         1                 11     return 0
                           11   }+
         0          1 -    12   for (;divisor < val / 2;)
         0          0 -    14     if (val % divisor == 0)
         0            -    15       return 0
                           15     }-
                           16   }+
         1                 17   return 1
                           18 }
***TER  69 % (  9/ 13) of FUNCTION is_prime()
        82 % (  9/ 11) statement
-----------------------------------------------------------------------------

***TER  69 % (  9/ 13) of FILE F:\ctcwork\v90\doc\examples\calc.c
        82 % (  9/ 11) statement
-----------------------------------------------------------------------------
 
SUMMARY
=======
Source files       : 3
Headers extracted  : 0
Functions          : 4
Source lines       : 59
TER                : 80 % (20/25) decision
TER                : 88 % (21/24) statement

This Execution Profile Listing has been generated by ctcpost -fd option (force decision coverage view). The difference shows at file calc.c on line 8. I.e. even if the files had been instrumented for multicondition coverage and such instrumented code was executed, in this view of the complex condition expressions it is shown only the overall decisions true and false counts. Of course the code may have been straight away been instrumented for decision coverage.