重置上传,新增了多个标准库,开始 TransPyV 自举实验
This commit is contained in:
@@ -20,11 +20,13 @@ 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):
|
||||
@@ -32,6 +34,7 @@ def ok(msg: str):
|
||||
global _pass_count
|
||||
_pass_count += 1
|
||||
stdio.printf("PASS: %s\n", msg)
|
||||
stdio.fflush(None)
|
||||
|
||||
|
||||
def fail(msg: str):
|
||||
@@ -39,6 +42,7 @@ 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):
|
||||
@@ -52,6 +56,7 @@ 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:
|
||||
@@ -61,6 +66,7 @@ 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
|
||||
|
||||
|
||||
@@ -68,4 +74,5 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user