diff options
author | Casper Beyer <caspervonb@pm.me> | 2020-10-20 19:51:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-20 13:51:57 +0200 |
commit | 17467d01dad3f280b7f788ba87953392a8e304bb (patch) | |
tree | c9b8714a0ec222bbb9525071368ac8a923e7f8aa /std/io/bufio_test.ts | |
parent | 9cf06f76fdeb4b8cff4a47e269984d3b9a64a9be (diff) |
fix(std/io): remove trivial internal util.ts module (#8032)
Diffstat (limited to 'std/io/bufio_test.ts')
-rw-r--r-- | std/io/bufio_test.ts | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/std/io/bufio_test.ts b/std/io/bufio_test.ts index d647082ad..03f699d50 100644 --- a/std/io/bufio_test.ts +++ b/std/io/bufio_test.ts @@ -17,7 +17,6 @@ import { import * as iotest from "./_iotest.ts"; import { StringReader } from "./readers.ts"; import { StringWriter } from "./writers.ts"; -import { charCode } from "./util.ts"; import { copyBytes } from "../bytes/mod.ts"; const encoder = new TextEncoder(); @@ -140,7 +139,7 @@ Deno.test("bufioBufferFull", async function (): Promise<void> { const decoder = new TextDecoder(); try { - await buf.readSlice(charCode("!")); + await buf.readSlice("!".charCodeAt(0)); fail("readSlice should throw"); } catch (err) { assert(err instanceof BufferFullError); @@ -148,7 +147,7 @@ Deno.test("bufioBufferFull", async function (): Promise<void> { assertEquals(decoder.decode(err.partial), "And now, hello, "); } - const line = await buf.readSlice(charCode("!")); + const line = await buf.readSlice("!".charCodeAt(0)); assert(line !== null); const actual = decoder.decode(line); assertEquals(actual, "world!"); @@ -332,7 +331,7 @@ Deno.test("bufioWriter", async function (): Promise<void> { for (let i = 0; i < data.byteLength; i++) { // eslint-disable-next-line @typescript-eslint/restrict-plus-operands - data[i] = charCode(" ") + (i % (charCode("~") - charCode(" "))); + data[i] = " ".charCodeAt(0) + (i % ("~".charCodeAt(0) - " ".charCodeAt(0))); } const w = new Deno.Buffer(); @@ -366,7 +365,7 @@ Deno.test("bufioWriterSync", function (): void { for (let i = 0; i < data.byteLength; i++) { // eslint-disable-next-line @typescript-eslint/restrict-plus-operands - data[i] = charCode(" ") + (i % (charCode("~") - charCode(" "))); + data[i] = " ".charCodeAt(0) + (i % ("~".charCodeAt(0) - " ".charCodeAt(0))); } const w = new Deno.Buffer(); |