Skip to content

Commit

Permalink
Update tests, remove obsolete Buffer.write(...)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcposch committed Feb 4, 2016
1 parent 2c53436 commit 6413181
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion lib/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
'use strict';

const binding = process.binding('buffer');
const internalUtil = require('internal/util');
const bindingObj = {};

exports.Buffer = Buffer;
Expand Down
6 changes: 3 additions & 3 deletions test/parallel/test-buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,10 @@ assert.equal(rangeBuffer.toString({toString: function() {
// testing for smart defaults and ability to pass string values as offset
var writeTest = new Buffer('abcdes');
writeTest.write('n', 'ascii');
writeTest.write('o', 'ascii', '1');
writeTest.write('o', '1', 'ascii');
writeTest.write('d', '2', 'ascii');
writeTest.write('e', 3, 'ascii');
writeTest.write('j', 'ascii', 4);
writeTest.write('j', 4, 'ascii');
assert.equal(writeTest.toString(), 'nodejs');

// ASCII slice test
Expand Down Expand Up @@ -888,7 +888,7 @@ assert.equal(0, Buffer('hello').slice(0, 0).length);
assert.equal(buf[3], 0x63);

buf.fill(0xFF);
written = buf.write('abcd', 'utf8', 1, 2); // legacy style
written = buf.write('abcd', 1, 2, 'utf8');
console.log(buf);
assert.equal(written, 2);
assert.equal(buf[0], 0xFF);
Expand Down

0 comments on commit 6413181

Please sign in to comment.