Skip to content

Commit 28290ee

Browse files
committed
sweep fewer cut points in the cut-off animation test
1 parent aa39a89 commit 28290ee

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎tests/decode-frames.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const throwsA = async (fn, type, label) => {
3131
for (const [name, data] of Object.entries(inputs)) {
3232
const full = await Animation.decode(data);
3333
let decoded = 0, previous = 0;
34-
for (let cut = Math.floor(data.length / 16); cut < data.length; cut += Math.max(1, data.length >> 7)) {
34+
for (let cut = Math.floor(data.length / 16); cut < data.length; cut += Math.max(1, data.length >> 5)) {
3535
const part = await Animation.decode(data.subarray(0, cut)).catch(() => null);
3636
if (!part) continue;
3737
decoded++;
@@ -41,7 +41,7 @@ const throwsA = async (fn, type, label) => {
4141
if (sha256(frame.image.bitmap) !== sha256(full.frames[i].image.bitmap)) panic(`${name} cut at ${cut}: frame ${i} differs from the full file's`);
4242
});
4343
}
44-
if (name !== 'JPEG XL' && name !== 'JPEG XL lossless' && decoded < 3) panic(`${name}: only ${decoded} cuts decoded`);
44+
if (name !== "JPEG XL" && name !== "JPEG XL lossless" && decoded < 3) panic(`${name}: only ${decoded} cuts decoded`);
4545
}
4646
}
4747

0 commit comments

Comments
 (0)