Path:
tests/integration/features/code_coverage_gcov/02_cpp_namespace_gcovr_issue_2717/test.itest
Lines:
30
Non-empty lines:
23
Non-empty lines covered with requirements:
23 / 23 (100.0%)
Functions:
0
Functions covered by requirements:
0 / 0 (0.0%)
1
#
2
# @relation(SDOC-SRS-144, scope=file)
3
#
4
5
RUN: cd %T && g++ --coverage -g -O0 -o main %S/src/main.cpp %S/src/functions.cpp
6
7
RUN: cd %T && ./main | filecheck %s --check-prefix CHECK-CPP
8
CHECK-CPP: 5
9
CHECK-CPP: 20
10
11
RUN: cd %T && gcovr --object-directory ./ --root %S --html --html-details -o coverage.html
12
RUN: cd %T && gcovr --object-directory ./ --root %S --json --json-pretty -o coverage.gcov.json
13
RUN: cd %T && mkdir docs/ && cp coverage.gcov.json docs/
14
RUN: cp %S/strictdoc_config.py %T/docs/
15
RUN: cp -r %S/src %T/docs/
16
RUN: cd %T/docs && %strictdoc export . | filecheck %s --dump-input=fail
17
18
CHECK: Export completed.
19
20
RUN: %cat %T/docs/output/html/source_coverage.html | filecheck %s --dump-input=fail --check-prefix CHECK-SOURCE-COVERAGE
21
CHECK-SOURCE-COVERAGE: src/functions.cpp
22
23
RUN: %cat %T/docs/output/html/_source_files/src/functions.cpp.html | filecheck %s --dump-input=fail --check-prefix CHECK-SOURCE-FILE
24
CHECK-SOURCE-FILE: href="../../docs/coverage.gcov.html#GCOV-src-functions-cpp-test-Adder-add-int-const-int-const"
25
CHECK-SOURCE-FILE: href="../../docs/coverage.gcov.html#GCOV-src-functions-cpp-test-Multiplier-multiply-int-int-const"
26
CHECK-SOURCE-FILE: 5 - 7 | function test::Adder::add()
27
CHECK-SOURCE-FILE: 9 - 11 | function test::Multiplier::multiply()
28
29
RUN: %cat %T/docs/output/html/docs/coverage.gcov.html | filecheck %s --dump-input=fail --check-prefix CHECK-GCOV-REPORT
30
CHECK-GCOV-REPORT: coverage.functions.cpp.c5e71015e270864c89a8b6e26afb227b.html