tests/codecs (a-m): comments: specs only
This commit is contained in:
1 parent
a80299dce0
commit
5f7f6005f6
24 files changed
+46
-181
No files matched your search
@@ -1,6 +1,4 @@
|
||||
-- codecs/compress/Bzip2 tests: every fixture stream (Python bz2 = libbzip2, block sizes 1..9, RLE1 run edges, block-boundary
|
||||
-- runs, random / skewed data, concatenated streams with trailing garbage) decodes exactly; offsets / consumedEnd;
|
||||
-- maxBytes; CRC mismatches are Err.CHECKSUM; truncations are Err.TRUNCATED; the fuzz no-throw pass.
|
||||
-- codecs/compress/Bzip2 tests: Python bz2 (libbzip2) streams decode exactly, CRC mismatches, truncations.
|
||||
-- Fixtures: tools/fixtures/bzip2.py.
|
||||
local T = require("@tests/T")
|
||||
local Bzip2 = require("@rosetta/codecs/compress/Bzip2")
|
||||
@@ -33,7 +31,6 @@ local function case(name: string): any
|
||||
error("no case " .. name)
|
||||
end
|
||||
|
||||
-- inside a bigger buffer, at an offset
|
||||
do
|
||||
local c = case("text/l9")
|
||||
local big = buffer.create(#c.data + 20)
|
||||
@@ -44,7 +41,6 @@ do
|
||||
t:eq(consumed, 7 + #c.data, "consumedEnd at an offset")
|
||||
end
|
||||
|
||||
-- maxBytes
|
||||
do
|
||||
local c = case("zeros/l9")
|
||||
local _, e = Bzip2.decompress(c.data, nil, nil, { maxBytes = 1000 })
|
||||
@@ -53,7 +49,6 @@ do
|
||||
t:check(ok ~= nil, "maxBytes = exact size")
|
||||
end
|
||||
|
||||
-- block CRC / stream CRC mismatches
|
||||
do
|
||||
local c = case("text/l9")
|
||||
local b = buffer.fromstring(c.data)
|
||||
@@ -84,7 +79,6 @@ do
|
||||
t:check(e3 and e3.code == Err.ARG, "bad offset")
|
||||
end
|
||||
|
||||
-- fuzz
|
||||
do
|
||||
local samples = {}
|
||||
for i, c in Fx.cases do
|
||||
|
||||
Reference in new issue
Block a user