use varuint-bitcoin

This commit is contained in:
Daniel Cousens 2016-10-06 21:53:48 +11:00
commit 29a865788d
5 changed files with 26 additions and 102 deletions

View file

@ -6,25 +6,6 @@ var bufferutils = require('../src/bufferutils')
var fixtures = require('./fixtures/bufferutils.json')
describe('bufferutils', function () {
// TODO: remove
describe('equals', function () {
it('works', function () {
var a = new Buffer('abcd', 'hex')
var b = new Buffer('bbbb', 'hex')
assert.strictEqual(bufferutils.equal(a, a), true)
assert.strictEqual(bufferutils.equal(a, b), false)
})
})
describe('reverse', function () {
it('works', function () {
var a = new Buffer('abcd', 'hex')
assert.strictEqual(bufferutils.reverse(a).toString('hex'), 'cdab')
})
})
describe('pushDataSize', function () {
fixtures.valid.forEach(function (f) {
it('determines the pushDataSize of ' + f.dec + ' correctly', function () {

View file

@ -86,14 +86,14 @@
"readUInt64LE": [
{
"description": "n === 2^53",
"exception": "value is larger than maximum value for type",
"exception": "RangeError: value out of range",
"hex64": "0000000000002000",
"hexVI": "ff0000000000000020",
"dec": 9007199254740992
},
{
"description": "n > 2^53",
"exception": "value is larger than maximum value for type",
"exception": "RangeError: value out of range",
"hex64": "0100000000002000",
"hexVI": "ff0100000000000020",
"dec": 9007199254740993