tests/image: comments: specs only

This commit is contained in:
4DBug committed 2026-11-01 01:50:18 -05:00
1 parent e306d5c1d7
commit a80299dce0
27 files changed
+32 -199

No files matched your search

+1 -8
View File
@@ -1,7 +1,4 @@
-- image/dds tests: files from NVIDIA Texture Tools (BGRA, BC1..BC7 incl. BC6H, mips, DX10, cube / array / volume)
-- and ImageMagick against every surface's reference decode (Pillow per surface, Godot floats for BC6H); hand-written
-- uncompressed DXGI / legacy / FourCC formats against their values (rgba8 and native floats); our encoder's files read
-- by Pillow and nvddsinfo, and round trips; errors; the fuzz no-throw pass. Fixtures: tools/fixtures/dds.py.
-- image/dds tests against NVIDIA Texture Tools, ImageMagick, Pillow and Godot (BC6H floats) (tools/fixtures/dds.py).
local T = require("@tests/T")
local Dds = require("@rosetta/image/dds")
local Bytes = require("@rosetta/core/Bytes")
@@ -26,7 +23,6 @@ local function maxDiff(a: buffer, b: buffer, n: number): number
return worst
end
-- tool-written files
local surfaces = 0
for _, c in Fx.cases do
local img, err = dec(c.data, { mips = true })
@@ -70,7 +66,6 @@ for _, c in Fx.cases do
end
t:note("%d tool-written files, %d surfaces match the references", #Fx.cases, surfaces)
-- hand-written formats
for _, c in Fx.hand do
local img, err = dec(c.data)
t:check(img, c.name .. ": " .. tostring(err))
@@ -158,7 +153,6 @@ for _, o in Fx.ours do
end
t:note("%d of our files read by Pillow / nvddsinfo", #Fx.ours)
-- round trips
do
local img = Types.Image.new(37, 23)
img.pixels = src
@@ -178,7 +172,6 @@ do
t:check(e2 and e2.code == Err.ARG, "no bc7 encoder")
end
-- sniff and errors
do
local c = Fx.cases[1]
t:eq(Dds.sniff(Bytes.reader(buffer.fromstring(c.data))), 1, "sniff")