From f3bce9c7b8e75846c33d4b8672510092b92b3139 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 6 Dec 2018 17:18:10 -0500 Subject: [PATCH] Format --- buffer_test.ts | 2 +- bufio_test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/buffer_test.ts b/buffer_test.ts index 9a71e80a33..1958f8e97d 100644 --- a/buffer_test.ts +++ b/buffer_test.ts @@ -17,7 +17,7 @@ function init() { if (testBytes == null) { testBytes = new Uint8Array(N); for (let i = 0; i < N; i++) { - testBytes[i] = "a".charCodeAt(0) + i % 26; + testBytes[i] = "a".charCodeAt(0) + (i % 26); } const decoder = new TextDecoder(); testString = decoder.decode(testBytes); diff --git a/bufio_test.ts b/bufio_test.ts index 5f32500a7a..fb5dc23e89 100644 --- a/bufio_test.ts +++ b/bufio_test.ts @@ -109,7 +109,7 @@ test(async function bufioBufReader() { for (let i = 0; i < texts.length - 1; i++) { texts[i] = str + "\n"; all += texts[i]; - str += String.fromCharCode(i % 26 + 97); + str += String.fromCharCode((i % 26) + 97); } texts[texts.length - 1] = all; @@ -294,7 +294,7 @@ test(async function bufioWriter() { const data = new Uint8Array(8192); for (let i = 0; i < data.byteLength; i++) { - data[i] = charCode(" ") + i % (charCode("~") - charCode(" ")); + data[i] = charCode(" ") + (i % (charCode("~") - charCode(" "))); } const w = new Buffer();