1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-03 12:58:54 -05:00
This commit is contained in:
Ryan Dahl 2018-12-06 17:18:10 -05:00
parent 1bf555ab2f
commit f3bce9c7b8
2 changed files with 3 additions and 3 deletions

View file

@ -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);

View file

@ -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();