Path:
tests/integration/features/source_code_traceability/_source_nodes/11_functions_without_fields_do_not_generate_node/test.itest
Lines:
29
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
# This test verifies that only functions that have at least one annotated field
3
# get an auto-generated SDoc node, while plain comments without field annotation
4
# don't cause auto-generation. Relation markers don't count as field annotation
5
# and shall work as usual.
6
#
7
# @relation(SDOC-SRS-141, scope=file)
8
#
9
10
RUN: %strictdoc export %S --output-dir %T | filecheck %s
11
12
CHECK: Export completed.
13
14
RUN: %check_exists --file "%T/html/_source_files/tests/file.c.html"
15
16
RUN: %cat %T/html/%THIS_TEST_FOLDER/input.html | filecheck %s --check-prefix CHECK-HTML
17
CHECK-HTML: TEST_DOC/tests/file.c/test_case_1
18
CHECK-HTML: tests/file.c, <i>lines: 3-20</i>, function test_case_1()
19
# relation markers shall still work, but no link to auto-generated shall be there
20
CHECK-HTML-NOT: TEST_DOC/tests/file.c/test_case_2
21
CHECK-HTML: tests/file.c, <i>lines: 22-29</i>, function test_case_2()
22
23
RUN: %cat %T/html/%THIS_TEST_FOLDER/description.html | filecheck %s --check-prefix CHECK-HTML-TESTSPEC
24
CHECK-HTML-TESTSPEC: test_case_1
25
CHECK-HTML-TESTSPEC-NOT: test_case_2
26
27
# test_case_2 shall still count as covered, since it has a relation marker
28
RUN: %cat %T/html/source_coverage.html | filecheck %s --check-prefix CHECK-SOURCE-COVERAGE
29
CHECK-SOURCE-COVERAGE: 96.3