We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d709238 commit 1677a7bCopy full SHA for 1677a7b
tests/suite.js
@@ -788,6 +788,18 @@ var suite = {
788
}
789
test.done();
790
},
791
+
792
+ "NaN": function(test) {
793
+ var bb = new ByteBuffer(4);
794
+ test.ok(isNaN(bb.writeFloat(NaN).flip().readFloat(0)));
795
+ test.strictEqual(bb.writeFloat(+Infinity).flip().readFloat(0), +Infinity);
796
+ test.strictEqual(bb.writeFloat(-Infinity).flip().readFloat(0), -Infinity);
797
+ bb.resize(8);
798
+ test.ok(isNaN(bb.writeDouble(NaN).flip().readDouble(0)));
799
+ test.strictEqual(bb.writeDouble(+Infinity).flip().readDouble(0), +Infinity);
800
+ test.strictEqual(bb.writeDouble(-Infinity).flip().readDouble(0), -Infinity);
801
+ test.done();
802
+ },
803
804
"commonjs": function(test) {
805
var fs = require("fs")
0 commit comments