{# -*- engine: jinja -*- #} {# Check if we have any branch data #} {% set partial_count = lines.partial if lines.partial is defined else 0 %} {% set excluded_count = lines.excluded if lines.excluded is defined else 0 %} {% set uncovered_total = (lines.total - lines.exec) + partial_count %}
{{filename.split('/')[-1]}}
{% if partial_count > 0 %} {% endif %} {% if excluded_count > 0 %} {% endif %}
{% if SHOW_BRANCH_COVERAGE %} {% endif %} {% if SHOW_CONDITION_COVERAGE %} {% endif %} {% if SHOW_DECISION %} {% endif %} {% if SHOW_CALLS %} {% endif %}
{% if info.navigation is defined and fname in info.navigation %} {% endif %} {% if uncovered_total > 0 %} {% if info.navigation is defined and fname in info.navigation %}{% endif %}
{% endif %}
{% if function_list is defined and function_list | length > 0 %}
f(x) Functions ({{ function_list | length }})
{% set sortable = " sortable" if function_list | length > 1 else "" %}
Function Calls Lines {% if SHOW_BRANCH_COVERAGE %} Branches {% endif %} Blocks
{% for entry in function_list | sort(attribute='line') %} {% set calls = entry.count if entry.count is defined else entry.execution_count if entry.execution_count is defined else none %} {% set blks = entry.blocks if entry.blocks is defined else entry.blocks_percent if entry.blocks_percent is defined else none %} {{ entry.name }} :{{ entry.line }} {%- if entry.excluded %}–{% elif calls is not none and calls > 0 %}{{ calls }}x{% else %}0{% endif -%} {%- if entry.excluded %}–{% elif entry.line_coverage is defined %}{{ entry.line_coverage | round(1) }}%{% else %}–{% endif -%} {% if SHOW_BRANCH_COVERAGE %} {%- if entry.excluded %}–{% elif entry.branch_coverage is defined and entry.branch_coverage != '-' %}{{ entry.branch_coverage | round(1) }}%{% else %}–{% endif -%} {% endif %} {%- if entry.excluded %}–{% elif blks is not none %}{{ blks | round(1) }}%{% else %}–{% endif -%} {% endfor %}
{% endif %}
{% if SHOW_BRANCH_COVERAGE %} {% endif %} {% if SHOW_CONDITION_COVERAGE %} {% endif %} {% if SHOW_DECISION %} {% endif %} {% if SHOW_CALLS %} {% endif %} {% if USE_BLOCK_IDS %} {% endif %} {% for row in source_lines %} {% set line_anchor = "L{}".format(row.lineno) %} {% if SHOW_BRANCH_COVERAGE %} {% endif %} {% if SHOW_CONDITION_COVERAGE %} {% endif %} {% if SHOW_DECISION %} {% endif %} {% if SHOW_CALLS %} {% endif %} {% if USE_BLOCK_IDS %} {% endif %} {% endfor %}
LineBranchConditionDecisionCallTLA Hits Source CodeBlock IDs
{{row.lineno}} {% if row.line_branches %}
{{row.line_branches | sum(attribute='taken')}}/{{row.line_branches | sum(attribute='total')}}
{% for linebranch in row.line_branches %} {% if loop.length > 1 %}
{{linebranch.function_name}}:
{% endif %} {% for branch in linebranch.branches %} {% if branch.branchno is defined %} {% set branch_info = branch.branchno %} {% else %} {% set branch_info = "%d → %d" | format(branch.source_block_id, branch.destination_block_id) | safe %} {% endif %} {% if branch.excluded %}
– Branch {{branch_info}} excl.
{% elif branch.taken %}
✓ Branch {{branch_info}} taken {{branch.count}} time{% if branch.count > 1 %}s{% endif %}.
{% else %}
✗ Branch {{branch_info}} not taken.
{% endif %} {% endfor %} {% endfor %}
{% endif %}
{% if row.line_conditions %}
{{row.line_conditions | sum(attribute='covered') }}/{{row.line_conditions | sum(attribute='count')}}
{% for linecondition in row.line_conditions %} {% if loop.length > 1 %}
{{linecondition.function_name}}:
{% endif %} {% for condition in linecondition.condition %} {% if condition.excluded %}
– {{condition.prefix}}excluded.
{% elif condition.not_covered_true and condition.not_covered_false %}
✗ {{condition.prefix}}Not covered.
{% elif condition.not_covered_true %}
✗ {{condition.prefix}}True not covered.
{% elif condition.not_covered_false %}
✗ {{condition.prefix}}False not covered.
{% else %}
✓ {{condition.prefix}}Fully covered.
{% endif%} {% endfor %} {% endfor %}
{% endif %}
{% if row.line_decisions %}
{{row.line_decisions | sum(attribute='taken')}}/{{row.line_decisions | sum(attribute='total')}}
{% for linedecision in row.line_decisions %} {% if loop.length > 1 %}
{{linedecision.function_name}}:
{% endif %} {% for decision in linedecision.decisions %} {% if decision.uncheckable %}
? Decision couldn't be analyzed.
{% elif decision.taken %}
✓ Decision '{{decision.name}}' taken {{decision.count}} time{% if decision.count > 1 %}s{% endif %}.
{% else %}
✗ Decision '{{decision.name}}' not taken.
{% endif %} {% endfor %} {% endfor %}
{% endif %}
{% if row.line_calls %}
{{row.line_calls | sum(attribute='invoked')}}/{{row.line_calls | sum(attribute='total')}}
{% for linecall in row.line_calls %} {% if loop.length > 1 %}
{{linecall.function_name}}:
{% endif %} {% for call in linecall.calls %} {% if call.excluded %}
– Call {{call.name}} excl.
{% elif call.invoked %}
✓ Call {{call.name}} invoked.
{% else %}
✗ Call {{call.name}} not invoked.
{% endif%} {% endfor %} {% endfor %}
{% endif %}
{% if row.covclass == 'uncoveredLine' %}✗{% elif row.covclass == 'excludedLine' %}−{% elif row.linecount %}{{row.linecount}}x{% endif %} {{row.source}}{% if row.block_ids %}{{row.block_ids | join(', ')}}{% endif %}