Home | History | Annotate | Download | only in Inputs
      1         -:    0:Source:srcdir/./nested_dir/../test.cpp
      2         -:    0:Graph:test_paths.gcno
      3         -:    0:Data:test_paths.gcda
      4         -:    0:Runs:3
      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 12884901888:   10:void A::B() {}
     16         -:   11:
     17     #####:   12:void useless() {}
     18         -:   13:
     19         -:   14:double more_useless() {
     20     #####:   15:  return 0;
     21         -:   16:}
     22         -:   17:
     23         -:   18:int foo() {
     24         3:   19:  on = true;
     25         3:   20:  return 3;
     26         -:   21:}
     27         -:   22:
     28         -:   23:int bar() {
     29     #####:   24:  len--;
     30     #####:   25:  return foo() + 45;
     31         -:   26:}
     32         -:   27:
     33        12:   28:void assign(int ii, int jj) {
     34        12:   29:  grid[ii][jj] = (ii+1) * (jj+1);
     35        12:   30:}
     36         -:   31:
     37         -:   32:void initialize_grid() {
     38        21:   33:  for (int ii = 0; ii < 2; ii++)
     39        36:   34:    for (int jj = 0; jj < 2; jj++)
     40        18:   35:      assign(ii, jj);
     41         3:   36:}
     42         -:   37:
     43         -:   38:int main() {
     44         3:   39:  initialize_grid();
     45         -:   40:
     46         3:   41:  int a = 2;
     47         3:   42:  on = rand() % 2;
     48         3:   43:  if (on) {
     49         3:   44:    foo();
     50         3:   45:    ++a;
     51         3:   46:  } else {
     52     #####:   47:    bar();
     53     #####:   48:    a += rand();
     54         -:   49:  }
     55         -:   50:
     56        66:   51:  for (int ii = 0; ii < 10; ++ii) {
     57        30:   52:    switch (rand() % 5) {
     58         -:   53:      case 0:
     59         6:   54:        a += rand();
     60         6:   55:        break;
     61         -:   56:      case 1:
     62         -:   57:      case 2:
     63         3:   58:        a += rand() / rand();
     64         3:   59:        break;
     65         -:   60:      case 3:
     66         9:   61:        a -= rand();
     67         9:   62:        break;
     68         -:   63:      default:
     69        12:   64:        a = -1;
     70        12:   65:    }
     71        30:   66:  }
     72         -:   67:
     73         3:   68:  A thing;
     74 25769803782:   69:  for (uint64_t ii = 0; ii < 4294967296; ++ii)
     75 12884901888:   70:    thing.B();
     76         -:   71:
     77         3:   72:  return a + 8 + grid[2][3] + len;
     78         -:   73:  return more_useless();
     79         -:   74:}
     80