deno.land / std@0.224.0 / io / read_short_test.ts

read_short_test.ts
View Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
import { assertEquals } from "../assert/mod.ts";import { readShort } from "./read_short.ts";import { BufReader } from "./buf_reader.ts";import { BinaryReader } from "./_test_common.ts";
Deno.test("testReadShort", async function () { const r = new BinaryReader(new Uint8Array([0x12, 0x34])); const short = await readShort(new BufReader(r)); assertEquals(short, 0x1234);});
std

Version Info

Tagged at
6 months ago