fix(JsonTest): write string hello 断言改用 strcmp(追加14 遗留,i8* == 是指针地址比较)

This commit is contained in:
TermiNexus committed 2026-08-15 13:12:12 +08:00
1 parent 396e0a54be
commit e400a1c0a7
1 file changed
+1 -1
+1 -1
View File
@@ -153,7 +153,7 @@ def test_write(pool: memhub.MemPool | t.CPtr):
# 写字符串
v2: json.JsonValue | t.CPtr = json.string_val(pool, "hello")
s2: t.CChar | t.CPtr = json.write(pool, v2, False)
testcheck.check(s2 == '"hello"', "write string hello", "write string hello")
testcheck.check(string.strcmp(s2, '"hello"') == 0, "write string hello", "write string hello")
# 写布尔
v3: json.JsonValue | t.CPtr = json.bool_val(pool, True)