rename: src/Formats -> src/Rosetta, @formats -> @rosetta requires, build/luajit/rosetta + rosetta._compat, build/roblox/Rosetta, ROSETTA_* env/globals, writer vendor strings
This commit is contained in:
1 parent
2956576d7f
commit
22ddcd78fa
941 files changed
+3364
-3364
No files matched your search
@@ -3,11 +3,11 @@
|
||||
-- (round trips for every colour type it picks, levels, text), the contract, and the fuzz no-throw pass.
|
||||
-- Ported from png-luau tests/png.luau. Fixtures: tools/fixtures/png.py.
|
||||
local T = require("@tests/T")
|
||||
local Png = require("@formats/image/png")
|
||||
local Bytes = require("@formats/core/Bytes")
|
||||
local Crc32 = require("@formats/core/Crc32")
|
||||
local Err = require("@formats/core/Err")
|
||||
local Types = require("@formats/Types")
|
||||
local Png = require("@rosetta/image/png")
|
||||
local Bytes = require("@rosetta/core/Bytes")
|
||||
local Crc32 = require("@rosetta/core/Crc32")
|
||||
local Err = require("@rosetta/core/Err")
|
||||
local Types = require("@rosetta/Types")
|
||||
local Suite = require("@tests/gen/png_suite")
|
||||
local Gen = require("@tests/gen/png_gen")
|
||||
|
||||
@@ -122,10 +122,10 @@ do
|
||||
end
|
||||
-- forced colour type, text chunks
|
||||
local img = image(16, 16, "rgba")
|
||||
img.meta.text = { Comment = "hello", Software = "formats-luau" }
|
||||
img.meta.text = { Comment = "hello", Software = "rosetta" }
|
||||
local png = Png.encode(img, { colorType = "rgba" }) :: buffer
|
||||
local back = Png.decode(Bytes.reader(png))
|
||||
t:check(back.meta.text and back.meta.text.Comment == "hello" and back.meta.text.Software == "formats-luau", "tEXt round trip")
|
||||
t:check(back.meta.text and back.meta.text.Comment == "hello" and back.meta.text.Software == "rosetta", "tEXt round trip")
|
||||
-- the photo bench image compresses
|
||||
local _, e = Png.encode({} :: any)
|
||||
t:check(e and e.code == Err.ARG, "encode of a non-image returns Err.ARG")
|
||||
|
||||
Reference in new issue
Block a user