summaryrefslogtreecommitdiff
path: root/std/io
diff options
context:
space:
mode:
authoruki00a <uki00a@gmail.com>2020-05-21 01:15:41 +0900
committerGitHub <noreply@github.com>2020-05-20 12:15:41 -0400
commit6d7e3621daad936c87de930e8b9537e5ccc913e3 (patch)
treeb034172781a5987d799875ce1aba8c55067bfb01 /std/io
parent22da75b8e554f69e552d6312c1ce412cbc6d05bd (diff)
fix: compilation error introduced by #4543 (#5673)
Diffstat (limited to 'std/io')
-rw-r--r--std/io/bufio_test.ts39
1 files changed, 21 insertions, 18 deletions
diff --git a/std/io/bufio_test.ts b/std/io/bufio_test.ts
index d3e39bff6..671ed2115 100644
--- a/std/io/bufio_test.ts
+++ b/std/io/bufio_test.ts
@@ -447,21 +447,24 @@ Deno.test("readStringDelimAndLines", async function (): Promise<void> {
assertEquals(lines_, ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]);
});
-Deno.test(async function bufReaderShouldNotShareArrayBufferAcrossReads() {
- const decoder = new TextDecoder();
- const data = "abcdefghijklmnopqrstuvwxyz";
- const bufSize = 25;
- const b = new BufReader(stringsReader(data), bufSize);
-
- const r1 = (await b.readLine()) as ReadLineResult;
- assertNotEOF(r1);
- assertEquals(decoder.decode(r1.line), "abcdefghijklmnopqrstuvwxy");
-
- const r2 = (await b.readLine()) as ReadLineResult;
- assertNotEOF(r2);
- assertEquals(decoder.decode(r2.line), "z");
- assert(
- r1.line.buffer !== r2.line.buffer,
- "array buffer should not be shared across reads"
- );
-});
+Deno.test(
+ "bufReaderShouldNotShareArrayBufferAcrossReads",
+ async function (): Promise<void> {
+ const decoder = new TextDecoder();
+ const data = "abcdefghijklmnopqrstuvwxyz";
+ const bufSize = 25;
+ const b = new BufReader(stringsReader(data), bufSize);
+
+ const r1 = (await b.readLine()) as ReadLineResult;
+ assert(r1 !== null);
+ assertEquals(decoder.decode(r1.line), "abcdefghijklmnopqrstuvwxy");
+
+ const r2 = (await b.readLine()) as ReadLineResult;
+ assert(r2 !== null);
+ assertEquals(decoder.decode(r2.line), "z");
+ assert(
+ r1.line.buffer !== r2.line.buffer,
+ "array buffer should not be shared across reads"
+ );
+ }
+);