StrictDoc Documentation
tests/integration/features/source_code_traceability/_source_nodes/32_merge_with_sdoc_by_mid/test.itest
Source file coverage
Path:
tests/integration/features/source_code_traceability/_source_nodes/32_merge_with_sdoc_by_mid/test.itest
Lines:
34
Non-empty lines:
28
Non-empty lines covered with requirements:
28 / 28 (100.0%)
Functions:
0
Functions covered by requirements:
0 / 0 (0.0%)
1
#
2
# This test verifies that a source nodes is merged with a static SDoc node with same explicit MID annotated.
3
# The following case shall be handled:
4
# - If MID is set and equal at both sides and no UID update is required, merge the node.
5
#
6
# Cases tested elsewhere:
7
# - If MID is set and equal on both sides but UID update would be required, this is considered a validation error.
8
#
9
# @relation(SDOC-SRS-141, scope=file)
10
#
11
 
12
RUN: %strictdoc --debug export %S --output-dir %T | filecheck %s
13
 
14
CHECK: Export to HTML: Hello world doc
15
 
16
RUN: %check_exists --file "%T/html/_source_files/src/example.c.html"
17
 
18
RUN: %cat %T/html/%THIS_TEST_FOLDER/source_node_base.html | filecheck %s --check-prefix CHECK-HTML
19
CHECK-HTML: Requirements from Source Nodes
20
CHECK-HTML-NOT: SRC-NODES-BASE/src/example.c/example_1
21
CHECK-HTML: 3bd0162d-d6d2-42a1-9324-ab8415190970
22
CHECK-HTML: TITLE from sdoc
23
CHECK-HTML: src/example.c, <i>lines: 3-16</i>, function example_1()
24
CHECK-HTML-NOT: FOO text from sdoc
25
CHECK-HTML: FOO text from example.c
26
CHECK-HTML-NOT: BAR text from sdoc
27
CHECK-HTML: BAR text from example.c
28
 
29
RUN: %cat %T/html/_source_files/src/example.c.html | filecheck %s --check-prefix CHECK-SOURCE-FILE
30
CHECK-HTML-NOT: SRC-NODES-BASE/src/example.c/example_1
31
CHECK-SOURCE-FILE: 3bd0162d-d6d2-42a1-9324-ab8415190970
32
 
33
RUN: %cat %T/html/source_coverage.html | filecheck %s --check-prefix CHECK-SOURCE-COVERAGE
34
CHECK-SOURCE-COVERAGE: 100.0