修复了大量存在的问题,增加了假鸭子类型等等机制
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from stdint import *
|
||||
import t, c
|
||||
import stdio
|
||||
import testcheck
|
||||
import string
|
||||
import viperlib
|
||||
import w32.win32console
|
||||
@@ -12,136 +13,160 @@ import w32.win32console
|
||||
# --- Test 1: %u 格式化小整数 (CUInt8T -> CUnsignedInt) ---
|
||||
def test_snprintf_u8():
|
||||
"""测试 CUInt8T 值通过 t.CUnsignedInt() 传递给 %u"""
|
||||
testcheck.section("Test 1: %u 格式化小整数 (CUInt8T -> CUnsignedInt)")
|
||||
hr: t.CUInt8T = 14
|
||||
mn: t.CUInt8T = 30
|
||||
sc: t.CUInt8T = 59
|
||||
buf: list[t.CChar, 64]
|
||||
buf: t.CArray[t.CChar, 64]
|
||||
string.memset(c.Addr(buf), 0, 64)
|
||||
viperlib.snprintf(c.Addr(buf), 64, "%02u:%02u:%02u", t.CUnsignedInt(hr), t.CUnsignedInt(mn), t.CUnsignedInt(sc))
|
||||
stdio.printf("Test1 (CUInt8T->%%u): [%s] (expect 14:30:59)\n", c.Addr(buf))
|
||||
testcheck.ok("CUInt8T -> %u (expect 14:30:59)")
|
||||
|
||||
|
||||
# --- Test 2: %u 格式化 CUInt16T ---
|
||||
def test_snprintf_u16():
|
||||
"""测试 CUInt16T 值通过 t.CUnsignedInt() 传递给 %u"""
|
||||
testcheck.section("Test 2: %u 格式化 CUInt16T")
|
||||
yr: t.CUInt16T = 2026
|
||||
buf: list[t.CChar, 64]
|
||||
buf: t.CArray[t.CChar, 64]
|
||||
string.memset(c.Addr(buf), 0, 64)
|
||||
viperlib.snprintf(c.Addr(buf), 64, "%04u", t.CUnsignedInt(yr))
|
||||
stdio.printf("Test2 (CUInt16T->%%u): [%s] (expect 2026)\n", c.Addr(buf))
|
||||
testcheck.ok("CUInt16T -> %u (expect 2026)")
|
||||
|
||||
|
||||
# --- Test 3: %lu 格式化 CUInt64T ---
|
||||
def test_snprintf_u64():
|
||||
"""测试 CUInt64T 值传递给 %lu"""
|
||||
testcheck.section("Test 3: %lu 格式化 CUInt64T")
|
||||
val: t.CUInt64T = 1234567890123
|
||||
buf: list[t.CChar, 64]
|
||||
buf: t.CArray[t.CChar, 64]
|
||||
string.memset(c.Addr(buf), 0, 64)
|
||||
viperlib.snprintf(c.Addr(buf), 64, "%lu", val)
|
||||
stdio.printf("Test3 (CUInt64T->%%lu): [%s] (expect 1234567890123)\n", c.Addr(buf))
|
||||
testcheck.ok("CUInt64T -> %lu (expect 1234567890123)")
|
||||
|
||||
|
||||
# --- Test 4: %d 格式化负数 ---
|
||||
def test_snprintf_d_neg():
|
||||
"""测试 %d 格式化负整数"""
|
||||
testcheck.section("Test 4: %d 格式化负数")
|
||||
val: t.CInt = -42
|
||||
buf: list[t.CChar, 64]
|
||||
buf: t.CArray[t.CChar, 64]
|
||||
string.memset(c.Addr(buf), 0, 64)
|
||||
viperlib.snprintf(c.Addr(buf), 64, "%d", val)
|
||||
stdio.printf("Test4 (CInt->%%d neg): [%s] (expect -42)\n", c.Addr(buf))
|
||||
testcheck.ok("CInt -> %d neg (expect -42)")
|
||||
|
||||
|
||||
# --- Test 5: %d 格式化正数 ---
|
||||
def test_snprintf_d_pos():
|
||||
testcheck.section("Test 5: %d 格式化正数")
|
||||
val: t.CInt = 42
|
||||
buf: list[t.CChar, 64]
|
||||
buf: t.CArray[t.CChar, 64]
|
||||
string.memset(c.Addr(buf), 0, 64)
|
||||
viperlib.snprintf(c.Addr(buf), 64, "%d", val)
|
||||
stdio.printf("Test5 (CInt->%%d pos): [%s] (expect 42)\n", c.Addr(buf))
|
||||
testcheck.ok("CInt -> %d pos (expect 42)")
|
||||
|
||||
|
||||
# --- Test 6: %x 格式化十六进制 ---
|
||||
def test_snprintf_x():
|
||||
testcheck.section("Test 6: %x 格式化十六进制")
|
||||
val: t.CUInt32T = 0xDEADBEEF
|
||||
buf: list[t.CChar, 64]
|
||||
buf: t.CArray[t.CChar, 64]
|
||||
string.memset(c.Addr(buf), 0, 64)
|
||||
viperlib.snprintf(c.Addr(buf), 64, "0x%08x", val)
|
||||
stdio.printf("Test6 (%%x): [%s] (expect 0xdeadbeef)\n", c.Addr(buf))
|
||||
testcheck.ok("%x hex (expect 0xdeadbeef)")
|
||||
|
||||
|
||||
# --- Test 7: 混合格式化 (模拟 desktop.py 时间格式) ---
|
||||
def test_snprintf_mixed():
|
||||
"""模拟 desktop.py 的时间格式化"""
|
||||
testcheck.section("Test 7: 混合格式化 (模拟 desktop.py 时间格式)")
|
||||
hr: t.CUInt8T = 14
|
||||
mn: t.CUInt8T = 5
|
||||
sc: t.CUInt8T = 9
|
||||
day: t.CUInt8T = 14
|
||||
mon: t.CUInt8T = 6
|
||||
yr: t.CUInt16T = 2026
|
||||
buf: list[t.CChar, 64]
|
||||
buf: t.CArray[t.CChar, 64]
|
||||
string.memset(c.Addr(buf), 0, 64)
|
||||
viperlib.snprintf(c.Addr(buf), 64, "%04u-%02u-%02u %02u:%02u:%02u",
|
||||
t.CUnsignedInt(yr), t.CUnsignedInt(mon), t.CUnsignedInt(day),
|
||||
t.CUnsignedInt(hr), t.CUnsignedInt(mn), t.CUnsignedInt(sc))
|
||||
stdio.printf("Test7 (time format): [%s] (expect 2026-06-14 14:05:09)\n", c.Addr(buf))
|
||||
testcheck.ok("time format (expect 2026-06-14 14:05:09)")
|
||||
|
||||
|
||||
# --- Test 8: printf 直接输出 variadic ---
|
||||
def test_printf_variadic():
|
||||
"""测试 printf 直接输出 variadic 参数"""
|
||||
testcheck.section("Test 8: printf 直接输出 variadic")
|
||||
stdio.printf("Test8 (printf direct): %u %d %lu 0x%x (expect 100 -50 999999999 0xcafe)\n",
|
||||
t.CUnsignedInt(100), -50, t.CUInt64T(999999999), 0xCAFE)
|
||||
testcheck.ok("printf direct variadic (expect 100 -50 999999999 0xcafe)")
|
||||
|
||||
|
||||
# --- Test 9: 多个 %lu 连续 ---
|
||||
def test_snprintf_multi_lu():
|
||||
"""测试多个 %lu 连续(模拟 perf 日志格式)"""
|
||||
testcheck.section("Test 9: 多个 %lu 连续")
|
||||
v1: t.CUInt64T = 16
|
||||
v2: t.CUInt64T = 2
|
||||
v3: t.CUInt64T = 11
|
||||
buf: list[t.CChar, 128]
|
||||
buf: t.CArray[t.CChar, 128]
|
||||
string.memset(c.Addr(buf), 0, 128)
|
||||
viperlib.snprintf(c.Addr(buf), 128, "wall=%lu work=%lu render=%lu", v1, v2, v3)
|
||||
stdio.printf("Test9 (multi %%lu): [%s] (expect wall=16 work=2 render=11)\n", c.Addr(buf))
|
||||
testcheck.ok("multi %lu (expect wall=16 work=2 render=11)")
|
||||
|
||||
|
||||
# --- Test 10: %u 格式化 0 ---
|
||||
def test_snprintf_zero():
|
||||
testcheck.section("Test 10: %u 格式化 0")
|
||||
val: t.CUInt32T = 0
|
||||
buf: list[t.CChar, 64]
|
||||
buf: t.CArray[t.CChar, 64]
|
||||
string.memset(c.Addr(buf), 0, 64)
|
||||
viperlib.snprintf(c.Addr(buf), 64, "%u", val)
|
||||
stdio.printf("Test10 (%%u zero): [%s] (expect 0)\n", c.Addr(buf))
|
||||
testcheck.ok("%u zero (expect 0)")
|
||||
|
||||
|
||||
# --- Test 11: %u 格式化大值 ---
|
||||
def test_snprintf_large():
|
||||
testcheck.section("Test 11: %u 格式化大值")
|
||||
val: t.CUInt32T = 4294967295 # 0xFFFFFFFF
|
||||
buf: list[t.CChar, 64]
|
||||
buf: t.CArray[t.CChar, 64]
|
||||
string.memset(c.Addr(buf), 0, 64)
|
||||
viperlib.snprintf(c.Addr(buf), 64, "%u", val)
|
||||
stdio.printf("Test11 (%%u max): [%s] (expect 4294967295)\n", c.Addr(buf))
|
||||
testcheck.ok("%u max (expect 4294967295)")
|
||||
|
||||
|
||||
# --- Test 12: CUnsignedInt cast from CUInt8T edge values ---
|
||||
def test_snprintf_u8_edge():
|
||||
"""测试 CUInt8T 边界值"""
|
||||
testcheck.section("Test 12: CUnsignedInt cast from CUInt8T edge values")
|
||||
v0: t.CUInt8T = 0
|
||||
v127: t.CUInt8T = 127
|
||||
v128: t.CUInt8T = 128
|
||||
v255: t.CUInt8T = 255
|
||||
buf: list[t.CChar, 64]
|
||||
buf: t.CArray[t.CChar, 64]
|
||||
string.memset(c.Addr(buf), 0, 64)
|
||||
viperlib.snprintf(c.Addr(buf), 64, "%u %u %u %u",
|
||||
t.CUnsignedInt(v0), t.CUnsignedInt(v127), t.CUnsignedInt(v128), t.CUnsignedInt(v255))
|
||||
stdio.printf("Test12 (CUInt8T edge): [%s] (expect 0 127 128 255)\n", c.Addr(buf))
|
||||
testcheck.ok("CUInt8T edge (expect 0 127 128 255)")
|
||||
|
||||
|
||||
def main() -> t.CInt | t.CExport:
|
||||
w32.win32console.SetConsoleCP(65001)
|
||||
w32.win32console.SetConsoleOutputCP(65001)
|
||||
|
||||
stdio.printf("=== VariadicTest: snprintf/printf variadic 参数测试 ===\n\n")
|
||||
testcheck.begin("VariadicTest: snprintf/printf variadic 参数测试")
|
||||
|
||||
test_snprintf_u8()
|
||||
test_snprintf_u16()
|
||||
@@ -156,5 +181,4 @@ def main() -> t.CInt | t.CExport:
|
||||
test_snprintf_large()
|
||||
test_snprintf_u8_edge()
|
||||
|
||||
stdio.printf("\n=== VariadicTest Complete ===\n")
|
||||
return 0
|
||||
return testcheck.end()
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"viperlib": "2953a7db4185005b", "main": "377ad03e9b90ac39", "stdint": "56cdd754a8a09347", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "string": "6aee24fdefa3cbc0", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "viperio": "c9f4be41ca1cc2b4", "w32.fileio": "fa3691e66b426950", "fileio": "fa3691e66b426950", "w32.win32file": "abf9ce3160c9279e", "win32file": "abf9ce3160c9279e", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3"}
|
||||
{"stdint": "49bd8cba55979f76", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "viperlib": "70b580331b822117", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "testcheck": "9dbecd0942a39782", "string": "b5f1dc665c52a1bd", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "main": "c1416dfae155d6e2", "viperio": "c9f4be41ca1cc2b4", "w32.win32file": "abf9ce3160c9279e", "win32file": "abf9ce3160c9279e", "w32.fileio": "fa3691e66b426950", "fileio": "fa3691e66b426950", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3"}
|
||||
@@ -1 +0,0 @@
|
||||
{"viperlib": "2953a7db4185005b", "main": "377ad03e9b90ac39", "stdint": "56cdd754a8a09347", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "string": "6aee24fdefa3cbc0", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "viperio": "c9f4be41ca1cc2b4", "w32.fileio": "fa3691e66b426950", "fileio": "fa3691e66b426950", "w32.win32file": "abf9ce3160c9279e", "win32file": "abf9ce3160c9279e", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "29813d57621099a9", "win32sync": "29813d57621099a9"}
|
||||
@@ -1 +1 @@
|
||||
{"viperlib": "2953a7db4185005b", "main": "377ad03e9b90ac39", "stdint": "56cdd754a8a09347", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "string": "6aee24fdefa3cbc0", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "viperio": "c9f4be41ca1cc2b4", "w32.fileio": "fa3691e66b426950", "fileio": "fa3691e66b426950", "w32.win32file": "abf9ce3160c9279e", "win32file": "abf9ce3160c9279e", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "29813d57621099a9", "win32sync": "29813d57621099a9"}
|
||||
{"stdint": "49bd8cba55979f76", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "viperlib": "70b580331b822117", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "testcheck": "9dbecd0942a39782", "string": "b5f1dc665c52a1bd", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "main": "c1416dfae155d6e2", "viperio": "c9f4be41ca1cc2b4", "w32.win32file": "abf9ce3160c9279e", "win32file": "abf9ce3160c9279e", "w32.fileio": "fa3691e66b426950", "fileio": "fa3691e66b426950", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1", "w32.win32process": "067c78e9f121dce3", "win32process": "067c78e9f121dce3", "w32.win32sync": "29813d57621099a9", "win32sync": "29813d57621099a9"}
|
||||
@@ -1 +0,0 @@
|
||||
{"viperlib": "2953a7db4185005b", "stdint": "56cdd754a8a09347", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "string": "6aee24fdefa3cbc0", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "viperio": "c9f4be41ca1cc2b4"}
|
||||
@@ -1 +1 @@
|
||||
{"viperlib": "2953a7db4185005b", "main": "377ad03e9b90ac39", "stdint": "56cdd754a8a09347", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "string": "6aee24fdefa3cbc0", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "viperio": "c9f4be41ca1cc2b4", "w32.fileio": "fa3691e66b426950", "fileio": "fa3691e66b426950"}
|
||||
{"stdint": "49bd8cba55979f76", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "viperlib": "70b580331b822117", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "testcheck": "9dbecd0942a39782", "string": "b5f1dc665c52a1bd", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "main": "c1416dfae155d6e2", "viperio": "c9f4be41ca1cc2b4"}
|
||||
@@ -1 +0,0 @@
|
||||
{"viperlib": "2953a7db4185005b", "main": "377ad03e9b90ac39", "stdint": "56cdd754a8a09347", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "string": "6aee24fdefa3cbc0", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "viperio": "c9f4be41ca1cc2b4"}
|
||||
1
Test/VariadicTest/output/70b580331b822117.deps.json
Normal file
1
Test/VariadicTest/output/70b580331b822117.deps.json
Normal file
@@ -0,0 +1 @@
|
||||
{"stdint": "49bd8cba55979f76", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "viperlib": "70b580331b822117", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "testcheck": "9dbecd0942a39782", "string": "b5f1dc665c52a1bd", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "main": "c1416dfae155d6e2", "viperio": "c9f4be41ca1cc2b4"}
|
||||
@@ -1 +1 @@
|
||||
{"viperlib": "2953a7db4185005b", "main": "377ad03e9b90ac39", "stdint": "56cdd754a8a09347", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "string": "6aee24fdefa3cbc0", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "viperio": "c9f4be41ca1cc2b4", "w32.fileio": "fa3691e66b426950", "fileio": "fa3691e66b426950", "w32.win32file": "abf9ce3160c9279e", "win32file": "abf9ce3160c9279e", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1"}
|
||||
{"stdint": "49bd8cba55979f76", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "viperlib": "70b580331b822117", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "testcheck": "9dbecd0942a39782", "string": "b5f1dc665c52a1bd", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "main": "c1416dfae155d6e2", "viperio": "c9f4be41ca1cc2b4", "w32.win32file": "abf9ce3160c9279e", "win32file": "abf9ce3160c9279e", "w32.fileio": "fa3691e66b426950", "fileio": "fa3691e66b426950", "w32.win32memory": "72e2d5ccb7cedcf1", "win32memory": "72e2d5ccb7cedcf1"}
|
||||
1
Test/VariadicTest/output/9dbecd0942a39782.deps.json
Normal file
1
Test/VariadicTest/output/9dbecd0942a39782.deps.json
Normal file
@@ -0,0 +1 @@
|
||||
{"stdint": "49bd8cba55979f76", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "viperlib": "70b580331b822117", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "testcheck": "9dbecd0942a39782", "string": "b5f1dc665c52a1bd", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "main": "c1416dfae155d6e2", "viperio": "c9f4be41ca1cc2b4"}
|
||||
@@ -1 +1 @@
|
||||
{"viperlib": "2953a7db4185005b", "main": "377ad03e9b90ac39", "stdint": "56cdd754a8a09347", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "string": "6aee24fdefa3cbc0", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "viperio": "c9f4be41ca1cc2b4", "w32.fileio": "fa3691e66b426950", "fileio": "fa3691e66b426950", "w32.win32file": "abf9ce3160c9279e", "win32file": "abf9ce3160c9279e"}
|
||||
{"stdint": "49bd8cba55979f76", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "viperlib": "70b580331b822117", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "testcheck": "9dbecd0942a39782", "string": "b5f1dc665c52a1bd", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "main": "c1416dfae155d6e2", "viperio": "c9f4be41ca1cc2b4", "w32.win32file": "abf9ce3160c9279e", "win32file": "abf9ce3160c9279e"}
|
||||
1
Test/VariadicTest/output/b5f1dc665c52a1bd.deps.json
Normal file
1
Test/VariadicTest/output/b5f1dc665c52a1bd.deps.json
Normal file
@@ -0,0 +1 @@
|
||||
{"stdint": "49bd8cba55979f76", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "viperlib": "70b580331b822117", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "testcheck": "9dbecd0942a39782", "string": "b5f1dc665c52a1bd", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "main": "c1416dfae155d6e2", "viperio": "c9f4be41ca1cc2b4"}
|
||||
@@ -1 +1 @@
|
||||
{"viperlib": "2953a7db4185005b", "main": "377ad03e9b90ac39", "stdint": "56cdd754a8a09347", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "string": "6aee24fdefa3cbc0", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "viperio": "c9f4be41ca1cc2b4", "w32.fileio": "fa3691e66b426950", "fileio": "fa3691e66b426950"}
|
||||
{"stdint": "49bd8cba55979f76", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "viperlib": "70b580331b822117", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "testcheck": "9dbecd0942a39782", "string": "b5f1dc665c52a1bd", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "main": "c1416dfae155d6e2", "viperio": "c9f4be41ca1cc2b4"}
|
||||
1
Test/VariadicTest/output/c1416dfae155d6e2.deps.json
Normal file
1
Test/VariadicTest/output/c1416dfae155d6e2.deps.json
Normal file
@@ -0,0 +1 @@
|
||||
{"stdint": "49bd8cba55979f76", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "viperlib": "70b580331b822117", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "testcheck": "9dbecd0942a39782", "string": "b5f1dc665c52a1bd", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "viperio": "c9f4be41ca1cc2b4"}
|
||||
@@ -1 +1 @@
|
||||
{"viperlib": "2953a7db4185005b", "main": "377ad03e9b90ac39", "stdint": "56cdd754a8a09347", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "string": "6aee24fdefa3cbc0", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "viperio": "c9f4be41ca1cc2b4"}
|
||||
{"stdint": "49bd8cba55979f76", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "viperlib": "70b580331b822117", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "testcheck": "9dbecd0942a39782", "string": "b5f1dc665c52a1bd", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "main": "c1416dfae155d6e2", "viperio": "c9f4be41ca1cc2b4"}
|
||||
@@ -1 +1 @@
|
||||
{"viperlib": "2953a7db4185005b", "main": "377ad03e9b90ac39", "stdint": "56cdd754a8a09347", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "string": "6aee24fdefa3cbc0", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "viperio": "c9f4be41ca1cc2b4", "w32.fileio": "fa3691e66b426950", "fileio": "fa3691e66b426950"}
|
||||
{"stdint": "49bd8cba55979f76", "w32.win32base": "5a6a2137958c28c5", "win32base": "5a6a2137958c28c5", "viperlib": "70b580331b822117", "stdarg": "71e0a3ffcb3ebfad", "stdio": "73edbcf76e32d00b", "testcheck": "9dbecd0942a39782", "string": "b5f1dc665c52a1bd", "w32.win32console": "bbdf3bbd4c3bc28c", "win32console": "bbdf3bbd4c3bc28c", "main": "c1416dfae155d6e2", "viperio": "c9f4be41ca1cc2b4", "w32.win32file": "abf9ce3160c9279e", "win32file": "abf9ce3160c9279e", "w32.fileio": "fa3691e66b426950", "fileio": "fa3691e66b426950"}
|
||||
@@ -64,4 +64,12 @@ CHAR16: t.CTypedef = t.CChar16T
|
||||
CHAR32: t.CTypedef = t.CChar32T
|
||||
CHAR8PTR: t.CTypedef = t.CChar8T | t.CPtr
|
||||
CHAR16PTR: t.CTypedef = t.CChar16T | t.CPtr
|
||||
CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr
|
||||
CHAR32PTR: t.CTypedef = t.CChar32T | t.CPtr
|
||||
i8: t.CTypedef = t.CInt8T
|
||||
i16: t.CTypedef = t.CInt16T
|
||||
i32: t.CTypedef = t.CInt32T
|
||||
i64: t.CTypedef = t.CInt64T
|
||||
u8: t.CTypedef = t.CUInt8T
|
||||
u16: t.CTypedef = t.CUInt16T
|
||||
u32: t.CTypedef = t.CUInt32T
|
||||
u64: t.CTypedef = t.CUInt64T
|
||||
25
Test/VariadicTest/temp/9dbecd0942a39782.pyi
Normal file
25
Test/VariadicTest/temp/9dbecd0942a39782.pyi
Normal file
@@ -0,0 +1,25 @@
|
||||
"""
|
||||
Auto-generated Python stub file from testcheck.py
|
||||
Module: testcheck
|
||||
"""
|
||||
|
||||
|
||||
import t, c
|
||||
import stdio
|
||||
|
||||
_pass_count: t.CExtern | t.CInt
|
||||
_fail_count: t.CExtern | t.CInt
|
||||
|
||||
def begin(name: str) -> t.CInt: pass
|
||||
|
||||
def section(name: str) -> t.CInt: pass
|
||||
|
||||
def ok(msg: str) -> t.CInt: pass
|
||||
|
||||
def fail(msg: str) -> t.CInt: pass
|
||||
|
||||
def check(cond: t.CInt, ok_msg: str, fail_msg: str) -> t.CInt: pass
|
||||
|
||||
def info(msg: str) -> t.CInt: pass
|
||||
|
||||
def end() -> t.CInt: pass
|
||||
@@ -1,9 +1,10 @@
|
||||
2953a7db4185005b:includes/viperlib.py
|
||||
377ad03e9b90ac39:main.py
|
||||
56cdd754a8a09347:includes/stdint.py
|
||||
49bd8cba55979f76:includes/stdint.py
|
||||
5a6a2137958c28c5:includes/w32\win32base.py
|
||||
6aee24fdefa3cbc0:includes/string.py
|
||||
70b580331b822117:includes/viperlib.py
|
||||
71e0a3ffcb3ebfad:includes/stdarg.py
|
||||
73edbcf76e32d00b:includes/stdio.py
|
||||
9dbecd0942a39782:includes/testcheck.py
|
||||
b5f1dc665c52a1bd:includes/string.py
|
||||
bbdf3bbd4c3bc28c:includes/w32\win32console.py
|
||||
c1416dfae155d6e2:main.py
|
||||
c9f4be41ca1cc2b4:includes/viperio.py
|
||||
|
||||
@@ -41,4 +41,4 @@ def atoll(src: str) -> t.CInt64T: pass
|
||||
|
||||
def atof(src: str) -> t.CDouble: pass
|
||||
|
||||
def split(s: str, delim: str, result: list[str]) -> int: pass
|
||||
def split(s: str, delim: str, result: t.CArray[str]) -> int: pass
|
||||
@@ -7,6 +7,7 @@ Module: main
|
||||
from stdint import *
|
||||
import t, c
|
||||
import stdio
|
||||
import testcheck
|
||||
import string
|
||||
import viperlib
|
||||
import w32.win32console
|
||||
Reference in New Issue
Block a user