Skip to content

Commit 4144951

Browse files
BridgeARdcodeIO
authored andcommitted
Remove noAssert (#89)
* Remove `noAssert` argument The `noAssert` argument support dropped in the upcoming Node.js 10.x release. This removes it therefore. * Fix failing test Asserting buffers with strictEqual is not possible. Those are two different objects and can only be compared with deepStrictEqual instead.
1 parent c5df326 commit 4144951

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/types/floats/float32.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ ByteBufferPrototype.writeFloat32 = function(value, offset) {
2222
//? ENSURE_CAPACITY(4);
2323
//? if (NODE) { // FIXME: Is there any way to inline the following in a sane way?
2424
this.littleEndian
25-
? this.buffer.writeFloatLE(value, offset, true)
26-
: this.buffer.writeFloatBE(value, offset, true);
25+
? this.buffer.writeFloatLE(value, offset)
26+
: this.buffer.writeFloatBE(value, offset);
2727
//? } else if (DATAVIEW)
2828
this.view.setFloat32(offset, value, this.littleEndian);
2929
//? else

src/types/floats/float64.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ ByteBufferPrototype.writeFloat64 = function(value, offset) {
1818
//? ENSURE_CAPACITY(8);
1919
//? if (NODE) {
2020
this.littleEndian
21-
? this.buffer.writeDoubleLE(value, offset, true)
22-
: this.buffer.writeDoubleBE(value, offset, true);
21+
? this.buffer.writeDoubleLE(value, offset)
22+
: this.buffer.writeDoubleBE(value, offset);
2323
//? } else if (DATAVIEW)
2424
this.view.setFloat64(offset, value, this.littleEndian);
2525
//? else
@@ -53,8 +53,8 @@ ByteBufferPrototype.readFloat64 = function(offset) {
5353
}
5454
//? if (NODE) {
5555
var value = this.littleEndian
56-
? this.buffer.readDoubleLE(offset, true)
57-
: this.buffer.readDoubleBE(offset, true);
56+
? this.buffer.readDoubleLE(offset)
57+
: this.buffer.readDoubleBE(offset);
5858
//? } else if (DATAVIEW)
5959
var value = this.view.getFloat64(offset, this.littleEndian);
6060
//? else

tests/suite.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ function makeSuite(ByteBuffer) {
130130
buf[0] = 0x01;
131131
var bb = ByteBuffer.wrap(buf);
132132
test.strictEqual(bb.capacity(), 1);
133-
test.strictEqual(bb.buffer, buf);
133+
test.deepStrictEqual(bb.buffer, buf);
134134
test.strictEqual(bb.toDebug(), "<01>");
135135
test.done();
136136
};

0 commit comments

Comments
 (0)