formats.exposed/test/png/parsePngUint.test.ts

9 lines
295 B
TypeScript
Raw Normal View History

import { assertEquals } from "assert";
import { b } from "../helpers.ts";
import parsePngUint from "../../public/png/parsePngUint.js";
Deno.test("parses PNG uints", () => {
assertEquals(parsePngUint(b(0, 0, 0, 0)), 0);
assertEquals(parsePngUint(b(0xfe, 0xdc, 0xba, 0x98)), 0xfedcba98);
});