Home | History | Annotate | Download | only in Inputs
      1         -:    0:Source:test.cpp
      2         -:    0:Graph:test.gcno
      3         -:    0:Data:test.gcda
      4         -:    0:Runs:2
      5         -:    0:Programs:1
      6         -:    1:#include "test.h"
      7         -:    2:#include <cstdlib>
      8         -:    3:
      9         -:    4:bool on = false;
     10         -:    5:int len = 42;
     11         -:    6:double grid[10][10] = {0};
     12         -:    7:const char * hello = "world";
     13         -:    8:const char * world = "hello";
     14         -:    9:
     15 function _ZN1A1BEv called 8589934592 returned 100% blocks executed 100%
     16 8589934592:   10:void A::B() {}
     17 8589934592:   10-block  0
     18         -:   11:
     19 function _Z7uselessv called 0 returned 0% blocks executed 0%
     20     #####:   12:void useless() {}
     21     $$$$$:   12-block  0
     22         -:   13:
     23 function _Z12more_uselessv called 0 returned 0% blocks executed 0%
     24         -:   14:double more_useless() {
     25     #####:   15:  return 0;
     26     $$$$$:   15-block  0
     27         -:   16:}
     28         -:   17:
     29 function _Z3foov called 2 returned 100% blocks executed 100%
     30         -:   18:int foo() {
     31         2:   19:  on = true;
     32         2:   20:  return 3;
     33         2:   20-block  0
     34         -:   21:}
     35         -:   22:
     36 function _Z3barv called 0 returned 0% blocks executed 0%
     37         -:   23:int bar() {
     38     #####:   24:  len--;
     39     #####:   25:  return foo() + 45;
     40     $$$$$:   25-block  0
     41         -:   26:}
     42         -:   27:
     43 function _Z6assignii called 8 returned 100% blocks executed 100%
     44         8:   28:void assign(int ii, int jj) {
     45         8:   29:  grid[ii][jj] = (ii+1) * (jj+1);
     46         8:   30:}
     47         8:   30-block  0
     48         -:   31:
     49 function _Z15initialize_gridv called 2 returned 100% blocks executed 100%
     50         -:   32:void initialize_grid() {
     51         6:   33:  for (int ii = 0; ii < 2; ii++)
     52         2:   33-block  0
     53         6:   33-block  1
     54 branch  0 taken 67%
     55 branch  1 taken 33%
     56         4:   33-block  2
     57        12:   34:    for (int jj = 0; jj < 2; jj++)
     58         4:   34-block  0
     59        12:   34-block  1
     60 branch  0 taken 67%
     61 branch  1 taken 33%
     62         8:   34-block  2
     63         8:   35:      assign(ii, jj);
     64         8:   35-block  0
     65         4:   35-block  1
     66         2:   36:}
     67         2:   36-block  0
     68         -:   37:
     69 function main called 2 returned 100% blocks executed 94%
     70         -:   38:int main() {
     71         2:   39:  initialize_grid();
     72         -:   40:
     73         2:   41:  int a = 2;
     74         2:   42:  on = rand() % 2;
     75         2:   43:  if (on) {
     76         2:   43-block  0
     77 branch  0 taken 100%
     78 branch  1 taken 0%
     79         2:   44:    foo();
     80         2:   45:    ++a;
     81         2:   46:  } else {
     82         2:   46-block  0
     83     #####:   47:    bar();
     84     #####:   48:    a += rand();
     85     $$$$$:   48-block  0
     86         -:   49:  }
     87         -:   50:
     88        22:   51:  for (int ii = 0; ii < 10; ++ii) {
     89         2:   51-block  0
     90        22:   51-block  1
     91 branch  0 taken 91%
     92 branch  1 taken 9%
     93        20:   51-block  2
     94        20:   52:    switch (rand() % 5) {
     95        20:   52-block  0
     96 branch  0 taken 20%
     97 branch  1 taken 0%
     98 branch  2 taken 10%
     99 branch  3 taken 30%
    100 branch  4 taken 40%
    101         -:   53:      case 0:
    102         4:   54:        a += rand();
    103         4:   55:        break;
    104         4:   55-block  0
    105         -:   56:      case 1:
    106         -:   57:      case 2:
    107         2:   58:        a += rand() / rand();
    108         2:   59:        break;
    109         2:   59-block  0
    110         -:   60:      case 3:
    111         6:   61:        a -= rand();
    112         6:   62:        break;
    113         6:   62-block  0
    114         -:   63:      default:
    115         8:   64:        a = -1;
    116         8:   65:    }
    117         8:   65-block  0
    118        20:   66:  }
    119        20:   66-block  0
    120         -:   67:
    121         2:   68:  A thing;
    122 8589934594:   69:  for (uint64_t ii = 0; ii < 4294967296; ++ii)
    123         2:   69-block  0
    124 8589934594:   69-block  1
    125 branch  0 taken 99%
    126 branch  1 taken 1%
    127 8589934592:   69-block  2
    128 8589934592:   70:    thing.B();
    129 8589934592:   70-block  0
    130         -:   71:
    131         2:   72:  return a + 8 + grid[2][3] + len;
    132         2:   72-block  0
    133         -:   73:  return more_useless();
    134         -:   74:}
    135