formats.exposed/test/gif/parseGif.test.ts

16 lines
433 B
TypeScript
Raw Normal View History

2023-08-16 16:45:11 +00:00
import { assertEquals } from "assert";
import { parseLogicalScreenDescriptorPackedField } from "../../public/gif/parseGif.js";
Deno.test("parsing logical screen descriptor packed field", () => {
const byte = 0b10110011;
const result = parseLogicalScreenDescriptorPackedField(byte);
assertEquals(result, {
globalColorTableFlag: true,
colorResolution: 4,
sortFlag: false,
sizeOfGlobalColorTable: 16,
});
});