Some simple information syncing

This commit is contained in:
2026-07-28 21:08:58 +08:00
parent 1837339f69
commit 3633be1995
65 changed files with 1132 additions and 368581 deletions

View File

@@ -20,13 +20,11 @@ def begin(name: str):
SetConsoleOutputCP(CP_UTF8)
SetConsoleCP(CP_UTF8)
stdio.printf("=== %s ===\n\n", name)
stdio.fflush(None)
def section(name: str):
"""打印分节标题"""
stdio.printf("--- %s ---\n", name)
stdio.fflush(None)
def ok(msg: str):
@@ -34,7 +32,6 @@ def ok(msg: str):
global _pass_count
_pass_count += 1
stdio.printf("PASS: %s\n", msg)
stdio.fflush(None)
def fail(msg: str):
@@ -42,7 +39,6 @@ def fail(msg: str):
global _fail_count
_fail_count += 1
stdio.printf("FAIL: %s\n", msg)
stdio.fflush(None)
def check(cond: t.CInt, ok_msg: str, fail_msg: str):
@@ -56,7 +52,6 @@ def check(cond: t.CInt, ok_msg: str, fail_msg: str):
def info(msg: str):
"""打印信息消息(不计入 PASS/FAIL"""
stdio.printf("%s\n", msg)
stdio.fflush(None)
def end() -> t.CInt:
@@ -66,7 +61,6 @@ def end() -> t.CInt:
_total_fail += _fail_count
stdio.printf("\n--- Summary ---\n")
stdio.printf("PASS: %d, FAIL: %d\n", _pass_count, _fail_count)
stdio.fflush(None)
return _fail_count
@@ -74,5 +68,4 @@ def summary() -> t.CInt:
"""打印所有套件的总计汇总,返回总失败数"""
stdio.printf("\n=== Total Summary ===\n")
stdio.printf("Total PASS: %d, Total FAIL: %d\n", _total_pass, _total_fail)
stdio.fflush(None)
return _total_fail