{% extends "html/index.html" %}
{% block script %}
function openFunctionalDetailModal() {
document.getElementById('functional-detail-modal-overlay').style.display = 'block';
document.getElementById('functional-detail-modal').style.display = 'block';
dragElement(document.getElementById('functional-detail-modal'));
}
// 关闭模态框
function closeFunctionalDetailModal() {
document.getElementById('functional-detail-modal-overlay').style.display = 'none';
document.getElementById('functional-detail-modal').style.display = 'none';
}
function dragElement(elmnt) {
var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;
elmnt.onmousedown = dragMouseDown;
function dragMouseDown(e) {
e = e || window.event;
e.preventDefault();
// get the mouse cursor position at startup:
pos3 = e.clientX;
pos4 = e.clientY;
document.onmouseup = closeDragElement;
// call a function whenever the cursor moves:
document.onmousemove = elementDrag;
}
function elementDrag(e) {
e = e || window.event;
e.preventDefault();
// calculate the new cursor position:
pos1 = pos3 - e.clientX;
pos2 = pos4 - e.clientY;
pos3 = e.clientX;
pos4 = e.clientY;
// set the element's new position:
elmnt.style.top = (elmnt.offsetTop - pos2) + "px";
elmnt.style.left = (elmnt.offsetLeft - pos1) + "px";
}
function closeDragElement() {
// stop moving when mouse button is released:
document.onmouseup = null;
document.onmousemove = null;
}
}
{% endblock %}
{% block coverage %}
Functional Coverage
{% if coverages.functional %}
{% set total_g = coverages.functional.group_num_total %}
{% set total_p = coverages.functional.point_num_total %}
{% set total_b = coverages.functional.bin_num_total %}
{% set hints_g = coverages.functional.group_num_hints %}
{% set hints_p = coverages.functional.point_num_hints %}
{% set hints_b = coverages.functional.bin_num_hints %}
{% if total_g != 0 %}
{% set rate_g = hints_g / total_g * 100 %}
{% else %}
{% set rate_g = 0 %}
{% endif %}
{% if total_p != 0 %}
{% set rate_p = hints_p / total_p * 100 %}
{% else %}
{% set rate_p = 0 %}
{% endif %}
{% if total_b != 0 %}
{% set rate_b = hints_b / total_b * 100 %}
{% else %}
{% set rate_b = 0 %}
{% endif %}
{% set fc_grate = coverages.functional.grate %}
{% set show_once = coverages.functional.has_once %}
Groups: {{hints_g}}/{{total_g}} ({{rate_g|round(2)}}%)
Points: {{hints_p}}/{{total_p}} ({{rate_p|round(2)}}%)
Bins: {{hints_b}}/{{total_b}} ({{rate_b|round(2)}}%)
{% for group in coverages.functional.groups %}
- Group: {{group.name}} {% if group.hinted %}Passed{% else %}Failed {% endif %}
{% for point in group.points %}
- {% if point.once %}
*
{% endif %}
Point: {{point.name}} {% if point.hinted %}Passed{% else %}Failed {% endif %}
{% for bin in point.bins %}
- Bin: {{bin.name}} {% if total_b != 0 %}
{% if bin.hinted != 0 %}
{{bin.hints}}
{% else %}
{{bin.hints}}
{% endif %}
{% else %}
0
{% endif %}
{% endfor %}
{% endfor %}
{% endfor %}
{% endif %}
{% if show_once %}
*: It means that once this coverage point is set as hinted, its bins will no longer be counted.
{% endif %}
Line Coverage
Coverage Rate |
Hint Lines |
Total Lines |
Detail |
{% if coverages.line is none %}
N/A |
N/A |
N/A |
N/A |
{% else %}
{% set line_rate = 0 %}
{% if coverages.line.total != 0 %}
{% set line_rate = (coverages.line.hints / coverages.line.total * 100) %}
{% endif %}
{{ line_rate|round(2) }}%
|
{{ coverages.line.hints }} |
{{ coverages.line.total }} |
View Details |
{% endif %}
|
Functional Coverage
Coverage Rate |
Hint Points |
Total Points |
Detail |
{% if coverages.functional is none %}
N/A |
N/A |
N/A |
N/A |
{% else %}
{% set point_rate = 0 %}
{% if coverages.functional.point_num_total != 0 %}
{% set point_rate = (coverages.functional.point_num_hints / coverages.functional.point_num_total * 100) %}
{% endif %}
{{ point_rate|round(2) }}%
|
{{ coverages.functional.point_num_hints }} |
{{ coverages.functional.point_num_total }} |
View Details |
{% endif %}
|
{% endblock %}
{% block footer %}
Toffee Report, Do Not Edit.
{% endblock %}