tests/codecs (a-m): comments: specs only

This commit is contained in:
4DBug committed 2026-11-01 01:50:19 -05:00
1 parent a80299dce0
commit 5f7f6005f6
24 files changed
+46 -181

No files matched your search

+2 -7
View File
@@ -1,8 +1,5 @@
-- codecs/model/Draco tests: Google's Draco test data (bitstreams 0.9 - 2.2) and files encoded by draco_encoder 1.5.7
-- at every compression level, quantization and as point clouds, decoded and compared byte for byte (points, faces,
-- every attribute's values per point, as CRCs) with libdraco's own decoder (tools/fixtures/_draco_dump.cc), kd-tree
-- point clouds included; argument errors; the fuzz no-throw pass (which also fails on any internal error the
-- decoder's safety net caught). Fixtures: tools/fixtures/draco.py.
-- codecs/model/Draco tests: Google's test data and draco_encoder 1.5.7 files against libdraco's decoder.
-- Fixtures: tools/fixtures/draco.py (dumps from tools/fixtures/_draco_dump.cc).
local T = require("@tests/T")
local Draco = require("@rosetta/codecs/model/Draco")
local Err = require("@rosetta/core/Err")
@@ -50,14 +47,12 @@ for _, c in Cases do
end
t:note("%d files decoded exactly like libdraco (%d kd-tree point clouds), %d rejected by both", counts.exact, counts.kd, counts.rejected)
-- the attribute lookup and the header
local first = Cases[1]
local info = Draco.info(first.data)
t:check(info and (info.kind == "mesh" or info.kind == "points"), "info")
t:check(Draco.sniff(buffer.fromstring(first.data)), "sniff")
t:check(not Draco.sniff(buffer.fromstring("DRAC")), "sniff short")
-- errors
local _, e1 = Draco.decode(buffer.fromstring("NOTDRACO......"))
t:check(e1 and e1.code == Err.CORRUPT, "not Draco data: " .. tostring(e1))
local _, e2 = Draco.decode(buffer.fromstring("DRACO\9\0\1\1\0\0"))