llvm-for-llvmta/test/tools/llvm-cov/gcov/Inputs/test_no_options.cpp.gcov

80 lines
2.3 KiB
Plaintext
Raw Permalink Normal View History

2022-04-25 10:02:23 +02:00
-: 0:Source:test.cpp
-: 0:Graph:test.gcno
-: 0:Data:test.gcda
-: 0:Runs:1
-: 0:Programs:1
-: 1:#include "test.h"
-: 2:#include <cstdlib>
-: 3:
-: 4:bool on = false;
-: 5:int len = 42;
-: 6:double grid[10][10] = {0};
-: 7:const char * hello = "world";
-: 8:const char * world = "hello";
-: 9:
4294967296: 10:void A::B() {}
-: 11:
#####: 12:void useless() {}
-: 13:
#####: 14:double more_useless() {
#####: 15: return 0;
-: 16:}
-: 17:
1: 18:int foo() {
1: 19: on = true;
1: 20: return 3;
-: 21:}
-: 22:
#####: 23:int bar() {
#####: 24: len--;
#####: 25: return foo() + 45;
-: 26:}
-: 27:
4: 28:void assign(int ii, int jj) {
4: 29: grid[ii][jj] = (ii+1) * (jj+1);
4: 30:}
-: 31:
1: 32:void initialize_grid() {
3: 33: for (int ii = 0; ii < 2; ii++)
6: 34: for (int jj = 0; jj < 2; jj++)
6: 35: assign(ii, jj);
1: 36:}
-: 37:
1: 38:int main() {
1: 39: initialize_grid();
-: 40:
1: 41: int a = 2;
1: 42: on = rand() % 2;
1: 43: if (on) {
1: 44: foo();
1: 45: ++a;
1: 46: } else {
#####: 47: bar();
#####: 48: a += rand();
-: 49: }
-: 50:
11: 51: for (int ii = 0; ii < 10; ++ii) {
10: 52: switch (rand() % 5) {
-: 53: case 0:
2: 54: a += rand();
2: 55: break;
-: 56: case 1:
-: 57: case 2:
4: 58: a += rand() / rand();
4: 59: break;
-: 60: case 3:
3: 61: a -= rand();
3: 62: break;
-: 63: default:
1: 64: a = -1;
1: 65: }
10: 66: }
-: 67:
1: 68: A thing;
4294967297: 69: for (uint64_t ii = 0; ii < 4294967296; ++ii)
4294967296: 70: thing.B();
-: 71:
1: 72: return a + 8 + grid[2][3] + len;
-: 73: return more_useless();
-: 74:}