fix(StringIterTest): 消除重复 main,恢复 inline list[struct, N] 覆盖

inline_test.vp 与 main.vp 各定义一个 main,过去靠 -Wl,--allow-multiple-definition 静默丢弃其一;去掉兜底 flag 后 ld.lld 报 duplicate symbol: main。现将 inline_test 的入口改名为 inline_array_test(),由 main.vp 显式 import 并调用。
This commit is contained in:
TermiNexus committed 2026-10-05 14:15:18 +08:00
1 parent 44ce29200e
commit defac67a95
2 files changed
+3 -1

No files matched your search

+1 -1
View File
@@ -35,7 +35,7 @@ class Container:
else:
stdio.printf("FAIL: inline list[struct, N] in Container\n")
def main() -> t.CInt:
def inline_array_test() -> t.CInt:
stdio.printf("=== InlineArrayTest ===\n")
c1 = Container()
c1.fill()
+2
View File
@@ -3,6 +3,7 @@ import stdio
import string
import c
import testcheck
import inline_test
# ============================================================
# Test 1: 字符串指针迭代 - 逐字符直到\0
@@ -176,4 +177,5 @@ def main() -> t.CInt:
test_ptr_arithmetic()
test_manual_strcmp()
test_struct_ptr_access()
inline_test.inline_array_test()
return testcheck.end()