基本稳定

This commit is contained in:
TermiNexus committed 2026-08-07 19:35:20 +08:00
1 parent 02479420e8
commit acc126ce0c
1868 files changed
+1386 -62775

No files matched your search

+1 -2
View File
@@ -14,6 +14,7 @@ _mbuddy: memhub.MemBuddy | t.CPtr
@t.CExport
def main() -> int:
global _mbuddy
testcheck.begin("ArgparseTest: 命令行参数解析")
# 初始化内存管理器
@@ -90,7 +91,6 @@ def main() -> int:
cnt: INT = args.get_int("count")
verb: INT = args.get_bool("verbose")
out: str = args.get_str("output")
stdio.printf("[DBG] has(verbose)=%d, get_bool(verbose)=%d\n", 1 if args.has("verbose") else 0, 1 if verb else 0)
testcheck.check(string.strcmp(inp, "test.txt") == 0, "input = test.txt", "input mismatch")
testcheck.check(cnt == 42, "count = 42", "count mismatch")
testcheck.check(verb == True, "verbose = True", "verbose mismatch")
@@ -121,7 +121,6 @@ def main() -> int:
string.strcpy(a2, "output2.dat")
a2_ptr: str | t.CPtr = t.CPtr(t.CUInt64T(argv2) + 16)
a2_ptr[0] = a2
args2 = parser.parse_args(3, argv2)
if args2 is not None:
testcheck.ok("parse_args returned non-NULL")