From: Calvin Metcalf Date: Tue, 6 Oct 2015 20:16:22 +0000 (-0400) Subject: failing test on android X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=a33f124fd8e7fe44a20e092fdcb7d51f77e59f67;p=buffer.git failing test on android --- diff --git a/test/write.js b/test/write.js index 38b199e..1163e50 100644 --- a/test/write.js +++ b/test/write.js @@ -114,3 +114,18 @@ test('hex of write{Uint,Int}{8,16,32}{LE,BE} with overflow', function (t) { } t.end() }) +test('android issue', function (t) { + var nums = [-25589992, -633756690, -898146932] + var out = new Buffer(12) + out.fill(0) + out.writeInt32BE(nums[0], 0) + var newNum = out.readInt32BE(0) + t.equal(nums[0], newNum) + out.writeInt32BE(nums[1], 4) + newNum = out.readInt32BE(4) + t.equal(nums[1], newNum) + out.writeInt32BE(nums[2], 8) + newNum = out.readInt32BE(8) + t.equal(nums[2], newNum) + t.end() +})