Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[squash]change into buf.toString()
  • Loading branch information
starkwang committed Jan 4, 2018
commit a914fbfb54ceaf570c32ed7896224b6b10c6cac7
10 changes: 5 additions & 5 deletions test/parallel/test-buffer-slice.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ const expectedSameBufs = [
[buf.slice('0', '-111'), Buffer.from('', 'utf8')]
];

for (let i = 0, s = buf; i < buf.length; ++i) {
for (let i = 0, s = buf.toString(); i < buf.length; ++i) {
expectedSameBufs.push(
[buf.slice(i), s.slice(i)],
[buf.slice(0, i), s.slice(0, i)],
[buf.slice(-i), s.slice(-i)],
[buf.slice(0, -i), s.slice(0, -i)]
[buf.slice(i), Buffer.from(s.slice(i))],
[buf.slice(0, i), Buffer.from(s.slice(0, i))],
[buf.slice(-i), Buffer.from(s.slice(-i))],
[buf.slice(0, -i), Buffer.from(s.slice(0, -i))]
);
}

Expand Down