fix: gcov Windows本地化 + runner合并 + 决策覆盖率修复

- gcov从WSL 15.2改为Windows MinGW 9.2.0,消除.gcno格式不匹配
- coverage.py去除leaf_stats复位bug(决策覆盖率恢复)
- runner.py合并V3编译+SOURCE分组执行+出力保存
- __init__.py gcov条件/outdir解析修复
This commit is contained in:
hangshuo652
2026-07-02 21:26:51 +08:00
parent b3d1643220
commit 40e8a50ab4
6 changed files with 635 additions and 21 deletions
+12 -5
View File
@@ -1402,15 +1402,22 @@ def propagate_assignments(rec, assignments, fields, file_sec=None):
if pi.get('type') == 'numeric':
digits = pi.get('digits', 0)
decimal = pi.get('decimal', 0)
total = digits + decimal
s = str(val)
neg = s.startswith('-')
if neg:
s = s[1:]
s = s.zfill(total)
int_part = s[:digits] if digits else '0'
dec_part = s[digits:] if decimal > 0 else '0'
result = float(int(int_part or '0') + int(dec_part or '0') / (10 ** decimal))
# Handle explicit decimal point (e.g. "008." or "12.34")
if '.' in s:
parts = s.split('.')
int_part = parts[0]
dec_part = parts[1] if len(parts) > 1 else ''
else:
total = digits + decimal
s = s.zfill(total)
int_part = s[:digits] if digits else '0'
dec_part = s[digits:] if decimal > 0 else ''
dec_val = int(dec_part.ljust(decimal, '0')[:decimal] or '0') if decimal > 0 else 0
result = float(int(int_part or '0') + dec_val / (10 ** decimal))
return -result if neg else result
try:
return float(val)