tests/model: comments: specs only
This commit is contained in:
1 parent
5f7f6005f6
commit
fe7566cbba
37 files changed
+72
-440
No files matched your search
+2
-12
@@ -1,9 +1,5 @@
|
||||
-- model/x3d tests: assimp's X3D / X3DV / X3DB test models, scenes and glTF samples written by VTK's X3D exporter and
|
||||
-- by assimp's X3D exporter, and hand-written feature files (the X3D triangle / quad / line sets, ColorRGBA,
|
||||
-- ProtoDeclare / ProtoInstance with SFNode defaults, PhysicalMaterial, UnlitMaterial, OrthoViewpoint, ROUTE
|
||||
-- animation, UNIT, the classic encoding's header statements), against assimp's X3D reader (meshes, faces, materials,
|
||||
-- world bounds) and exact expectations; .x3dv against the same model as .x3d; the writer (XML and classic): round
|
||||
-- trips, and assimp reading our X3D like the originals; errors; the fuzz no-throw pass. Fixtures: tools/fixtures/x3d.py.
|
||||
-- model/x3d tests: assimp's X3D models, VTK / assimp exports and hand-written files against assimp and exact values.
|
||||
-- Fixtures: tools/fixtures/x3d.py.
|
||||
local T = require("@tests/T")
|
||||
local F = require("@rosetta")
|
||||
local X3d = require("@rosetta/model/x3d")
|
||||
@@ -34,7 +30,6 @@ t:check(X3d.caps.decode and X3d.caps.encode, "contract")
|
||||
-- exporter writes points and lines as 1- / 2-vertex faces (not valid IndexedFaceSet faces, dropped here)
|
||||
local QUIRK = { ["assimp/X3D/ComputerKeyboard.x3d"] = "all", ["assimp-export/assimp_MeshPrimitiveModes.x3d"] = "all" }
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------ reference files
|
||||
local scenes, byName = {}, {}
|
||||
local checked = { assimp = 0, none = 0 }
|
||||
for i, c in Cases do
|
||||
@@ -73,7 +68,6 @@ for i, c in Cases do
|
||||
end
|
||||
t:note("%d files: %d against assimp, %d without a reference", #Cases, checked.assimp, checked.none)
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------ exact expectations
|
||||
do
|
||||
local kb = byName["assimp/X3D/ComputerKeyboard.x3d"]
|
||||
if kb then
|
||||
@@ -177,7 +171,6 @@ do
|
||||
end
|
||||
end
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------ writer
|
||||
local function compare(a: any, b: any, label: string)
|
||||
local sa, sb = C.stats(a), C.stats(b)
|
||||
t:eq(sb.prims, sa.prims, label .. ": placed primitives")
|
||||
@@ -215,7 +208,6 @@ for i, c in Cases do
|
||||
end
|
||||
t:note("%d round trips", rt)
|
||||
|
||||
-- assimp reads our X3D like the source
|
||||
local sources: { [string]: { any } } = { xcase = {}, wcase = {}, xgltf = {} }
|
||||
for i, c in Cases do
|
||||
sources.xcase[i] = { scenes[i], c }
|
||||
@@ -260,7 +252,6 @@ for _, x in Xcheck do
|
||||
end
|
||||
t:note("%d of our files read by assimp (%d skipped: empty nodes)", xc, skipped)
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------ api, errors
|
||||
do
|
||||
local hw = Cases[2]
|
||||
t:eq(F.detect(hw.data), "x3d", "F.detect .x3d")
|
||||
@@ -288,7 +279,6 @@ do
|
||||
t:check(us and #u.meshes == 2 and us.prims == 3 and near(us.hi[1], 6, 1e-9) and near(us.hi[2], 2, 1e-6), "USE / containerField / Switch in XML")
|
||||
end
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------ fuzz
|
||||
do
|
||||
local samples = {}
|
||||
for _, c in Cases do
|
||||
|
||||
Reference in new issue
Block a user