test: 对象化前的最后稳定版本

- OopInheritTest 全部类补类体字段声明(x/y/r/w/h/health/battery 等), 保证父类字段展平与 GEP 偏移正确
- 多个测试适配 i8* 指针比较语义(== 指针地址比较改 string.strcmp)
- 删除 ZlibTest/__zlib 旧实现与 find.py 调试脚本
- 更新 TODO 与 TestProject
This commit is contained in:
TermiNexus committed 2026-08-09 22:19:29 +08:00
1 parent cd1f662e17
commit e1cb560df0
23 files changed
+151 -3265

No files matched your search

+18 -4
View File
@@ -1,20 +1,24 @@
import w32.win32console as w32cmd
from w32.win32console import SetConsoleOutputCP, SetConsoleCP
import stdlib
import stdlib, stdio
import memhub
import string
import this
import t, c
pagecode: t.CDefine = 65001
@c.Attribute(t.attr.packed)
# @c.Attribute(t.attr.packed)
class A:
a: int = 1
def __init__(self):
self.a = 10
def workk():
print(1)
raise Exception("workk")
print(2)
@t.CExport
@@ -31,7 +35,7 @@ def main() -> int:
a: A | t.CPtr = m.alloc(A.__sizeof__())
string.memset(a, 0, A.__sizeof__())
string.memset(a, 0x00000002, A.__sizeof__())
c.DerefAs(a, 0x00000002) # *a = 2
print(a.a) # 2
a.__before_init__()
@@ -42,4 +46,14 @@ def main() -> int:
print("你好")
try:
workk()
except Exception as e:
print(e)
this.this()
#for s in "nihao":
# stdio.printf("%c", s)
return 0