diff options
Diffstat (limited to 'std/io')
-rw-r--r-- | std/io/bufio_test.ts | 20 | ||||
-rw-r--r-- | std/io/ioutil_test.ts | 16 | ||||
-rw-r--r-- | std/io/readers_test.ts | 6 | ||||
-rw-r--r-- | std/io/writers_test.ts | 2 |
4 files changed, 22 insertions, 22 deletions
diff --git a/std/io/bufio_test.ts b/std/io/bufio_test.ts index ef1fcc11e..7e737e60f 100644 --- a/std/io/bufio_test.ts +++ b/std/io/bufio_test.ts @@ -40,7 +40,7 @@ async function readBytes(buf: BufReader): Promise<string> { return decoder.decode(b.subarray(0, nb)); } -Deno.test(async function bufioReaderSimple(): Promise<void> { +Deno.test("bufioReaderSimple", async function (): Promise<void> { const data = "hello world"; const b = new BufReader(stringsReader(data)); const s = await readBytes(b); @@ -108,7 +108,7 @@ const bufsizes: number[] = [ 4096, ]; -Deno.test(async function bufioBufReader(): Promise<void> { +Deno.test("bufioBufReader", async function (): Promise<void> { const texts = new Array<string>(31); let str = ""; let all = ""; @@ -136,7 +136,7 @@ Deno.test(async function bufioBufReader(): Promise<void> { } }); -Deno.test(async function bufioBufferFull(): Promise<void> { +Deno.test("bufioBufferFull", async function (): Promise<void> { const longString = "And now, hello, world! It is the time for all good men to come to the" + " aid of their party"; @@ -157,7 +157,7 @@ Deno.test(async function bufioBufferFull(): Promise<void> { assertEquals(actual, "world!"); }); -Deno.test(async function bufioReadString(): Promise<void> { +Deno.test("bufioReadString", async function (): Promise<void> { const string = "And now, hello world!"; const buf = new BufReader(stringsReader(string), MIN_READ_BUFFER_SIZE); @@ -239,12 +239,12 @@ async function testReadLine(input: Uint8Array): Promise<void> { } } -Deno.test(async function bufioReadLine(): Promise<void> { +Deno.test("bufioReadLine", async function (): Promise<void> { await testReadLine(testInput); await testReadLine(testInputrn); }); -Deno.test(async function bufioPeek(): Promise<void> { +Deno.test("bufioPeek", async function (): Promise<void> { const decoder = new TextDecoder(); const p = new Uint8Array(10); // string is 16 (minReadBufferSize) long. @@ -320,7 +320,7 @@ Deno.test(async function bufioPeek(): Promise<void> { */ }); -Deno.test(async function bufioWriter(): Promise<void> { +Deno.test("bufioWriter", async function (): Promise<void> { const data = new Uint8Array(8192); for (let i = 0; i < data.byteLength; i++) { @@ -354,7 +354,7 @@ Deno.test(async function bufioWriter(): Promise<void> { } }); -Deno.test(function bufioWriterSync(): void { +Deno.test("bufioWriterSync", function (): void { const data = new Uint8Array(8192); for (let i = 0; i < data.byteLength; i++) { @@ -388,7 +388,7 @@ Deno.test(function bufioWriterSync(): void { } }); -Deno.test(async function bufReaderReadFull(): Promise<void> { +Deno.test("bufReaderReadFull", async function (): Promise<void> { const enc = new TextEncoder(); const dec = new TextDecoder(); const text = "Hello World"; @@ -414,7 +414,7 @@ Deno.test(async function bufReaderReadFull(): Promise<void> { } }); -Deno.test(async function readStringDelimAndLines(): Promise<void> { +Deno.test("readStringDelimAndLines", async function (): Promise<void> { const enc = new TextEncoder(); const data = new Buffer( enc.encode("Hello World\tHello World 2\tHello World 3") diff --git a/std/io/ioutil_test.ts b/std/io/ioutil_test.ts index bb01811ad..5e4d3e3d2 100644 --- a/std/io/ioutil_test.ts +++ b/std/io/ioutil_test.ts @@ -24,19 +24,19 @@ class BinaryReader implements Reader { } } -Deno.test(async function testReadShort(): Promise<void> { +Deno.test("testReadShort", async function (): Promise<void> { const r = new BinaryReader(new Uint8Array([0x12, 0x34])); const short = await readShort(new BufReader(r)); assertEquals(short, 0x1234); }); -Deno.test(async function testReadInt(): Promise<void> { +Deno.test("testReadInt", async function (): Promise<void> { const r = new BinaryReader(new Uint8Array([0x12, 0x34, 0x56, 0x78])); const int = await readInt(new BufReader(r)); assertEquals(int, 0x12345678); }); -Deno.test(async function testReadLong(): Promise<void> { +Deno.test("testReadLong", async function (): Promise<void> { const r = new BinaryReader( new Uint8Array([0x00, 0x00, 0x00, 0x78, 0x12, 0x34, 0x56, 0x78]) ); @@ -44,7 +44,7 @@ Deno.test(async function testReadLong(): Promise<void> { assertEquals(long, 0x7812345678); }); -Deno.test(async function testReadLong2(): Promise<void> { +Deno.test("testReadLong2", async function (): Promise<void> { const r = new BinaryReader( new Uint8Array([0, 0, 0, 0, 0x12, 0x34, 0x56, 0x78]) ); @@ -52,7 +52,7 @@ Deno.test(async function testReadLong2(): Promise<void> { assertEquals(long, 0x12345678); }); -Deno.test(function testSliceLongToBytes(): void { +Deno.test("testSliceLongToBytes", function (): void { const arr = sliceLongToBytes(0x1234567890abcdef); const actual = readLong(new BufReader(new BinaryReader(new Uint8Array(arr)))); const expected = readLong( @@ -65,12 +65,12 @@ Deno.test(function testSliceLongToBytes(): void { assertEquals(actual, expected); }); -Deno.test(function testSliceLongToBytes2(): void { +Deno.test("testSliceLongToBytes2", function (): void { const arr = sliceLongToBytes(0x12345678); assertEquals(arr, [0, 0, 0, 0, 0x12, 0x34, 0x56, 0x78]); }); -Deno.test(async function testCopyN1(): Promise<void> { +Deno.test("testCopyN1", async function (): Promise<void> { const w = new Buffer(); const r = stringsReader("abcdefghij"); const n = await copyN(r, w, 3); @@ -78,7 +78,7 @@ Deno.test(async function testCopyN1(): Promise<void> { assertEquals(w.toString(), "abc"); }); -Deno.test(async function testCopyN2(): Promise<void> { +Deno.test("testCopyN2", async function (): Promise<void> { const w = new Buffer(); const r = stringsReader("abcdefghij"); const n = await copyN(r, w, 11); diff --git a/std/io/readers_test.ts b/std/io/readers_test.ts index 05b63b892..c94285581 100644 --- a/std/io/readers_test.ts +++ b/std/io/readers_test.ts @@ -5,7 +5,7 @@ import { StringWriter } from "./writers.ts"; import { copyN } from "./ioutil.ts"; import { decode } from "../encoding/utf8.ts"; -test(async function ioStringReader(): Promise<void> { +test("ioStringReader", async function (): Promise<void> { const r = new StringReader("abcdef"); const res0 = await r.read(new Uint8Array(6)); assertEquals(res0, 6); @@ -13,7 +13,7 @@ test(async function ioStringReader(): Promise<void> { assertEquals(res1, Deno.EOF); }); -test(async function ioStringReader(): Promise<void> { +test("ioStringReader", async function (): Promise<void> { const r = new StringReader("abcdef"); const buf = new Uint8Array(3); const res1 = await r.read(buf); @@ -27,7 +27,7 @@ test(async function ioStringReader(): Promise<void> { assertEquals(decode(buf), "def"); }); -test(async function ioMultiReader(): Promise<void> { +test("ioMultiReader", async function (): Promise<void> { const r = new MultiReader(new StringReader("abc"), new StringReader("def")); const w = new StringWriter(); const n = await copyN(r, w, 4); diff --git a/std/io/writers_test.ts b/std/io/writers_test.ts index 24f2f3b3f..a50f8b3d1 100644 --- a/std/io/writers_test.ts +++ b/std/io/writers_test.ts @@ -4,7 +4,7 @@ import { StringWriter } from "./writers.ts"; import { StringReader } from "./readers.ts"; import { copyN } from "./ioutil.ts"; -test(async function ioStringWriter(): Promise<void> { +test("ioStringWriter", async function (): Promise<void> { const w = new StringWriter("base"); const r = new StringReader("0123456789"); await copyN(r, w, 4); |