tests/model: comments: specs only

This commit is contained in:
4DBug committed 2026-11-01 01:50:23 -05:00
1 parent 5f7f6005f6
commit fe7566cbba
37 files changed
+72 -440

No files matched your search

+2 -10
View File
@@ -1,8 +1,5 @@
-- model/pmx tests: assimp's MMD model (Alicia_blade.pmx) and synthetic PMX 2.0 / 2.1 models (UTF-16 / UTF-8, index
-- sizes 1 / 2 / 4, additional UVs, BDEF1 / BDEF2 / BDEF4 / SDEF / QDEF, every morph type, IK / inherit / axis bones,
-- display frames, rigid bodies, joints) against assimp (meshes, faces per mesh, materials, bones, world bounds) and the
-- generator's facts (vertices, weights, bones, morphs, textures); the same models as PMD against their PMX decode;
-- errors; the fuzz no-throw pass. Fixtures: tools/fixtures/pmx.py.
-- model/pmx tests: assimp's Alicia_blade.pmx and generated PMX 2.0 / 2.1 / PMD models against assimp and the generator.
-- Fixtures: tools/fixtures/pmx.py.
local T = require("@tests/T")
local F = require("@rosetta")
local Pmx = require("@rosetta/model/pmx")
@@ -55,7 +52,6 @@ local function findVertex(scene: any, pos: { number }, uv: { number }): (any, nu
return nil, nil
end
-- ------------------------------------------------------------------------------------------------ reference files
local scenes = {}
local checked = { assimp = 0, expect = 0 }
for i, c in Cases do
@@ -167,7 +163,6 @@ do
local skin = s.skins[1]
local ok = true
local world = {}
-- world matrices by walking from the root
local function walk(n: number, parent: { number })
local w = Types.Scene.mul(parent, Types.Scene.nodeMatrix(s.nodes[n]))
world[n] = w
@@ -186,7 +181,6 @@ do
end
end
-- ------------------------------------------------------------------------------------------------ PMD
for _, c in Pmds do
local s, err = decode(c.data)
t:check(s, c.name .. ": decode: " .. tostring(err))
@@ -215,7 +209,6 @@ for _, c in Pmds do
end
end
-- ------------------------------------------------------------------------------------------------ api, errors
do
local c = Cases[2]
t:eq(F.detect(c.data), "pmx", "F.detect pmx")
@@ -240,7 +233,6 @@ do
t:check(e7 and (e7.code == Err.TRUNCATED or e7.code == Err.CORRUPT), "PMD truncated: " .. tostring(e7))
end
-- ------------------------------------------------------------------------------------------------ fuzz
do
local samples = {}
for _, c in Cases do