LCOV - code coverage report
Current view: top level - res - test1.cpp (source / functions) Hit Total Coverage
Test: app.info Lines: 20 25 80.0 %
Date: 2016-01-11 Functions: 7 7 100.0 %

          Line data    Source code
       1             : #include <iostream>
       2             : 
       3           1 : int f1()
       4             : {
       5           1 :     int a =5;
       6           1 :     a++;
       7           1 :     return (a);
       8             : }
       9             : 
      10           1 : int *f2( int z)
      11             : {
      12           1 :   int *p = nullptr;
      13           1 :   if ( z > 0 )
      14             :   {
      15           1 :     p = new int;
      16             :   }
      17           1 :   return p;
      18             : }
      19             : 
      20           1 : int f3( int x )
      21             : {
      22           1 :   throw 1;
      23             :   f1();
      24             : }
      25             : 
      26           1 : int f4( int x)
      27             : try{
      28           1 :     if ( x>10 && *f2(0) )
      29             :     {
      30           0 :         f1();
      31           0 :         return(x);
      32             :     }
      33           1 :     else if ( f3(1) && f1() )
      34             :     {
      35           0 :         return(0);
      36             :     }
      37           0 :     f1();
      38           0 :     return 1;
      39           1 : } catch (...) {}
      40             : 
      41             : 
      42           1 : int main ()
      43             : {
      44           1 :      f1();
      45           1 :      f2(5);
      46           1 :      f4(5);
      47           4 : }
      48             : 
      49             : 

Generated by: LCOV version 1.10