summaryrefslogtreecommitdiff
path: root/std/io/bufio_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'std/io/bufio_test.ts')
-rw-r--r--std/io/bufio_test.ts9
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();