cuint
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -0,1 +1,6 @@ | ||
0.0.2 / 2014-01-02 | ||
================== | ||
* 1.div() fix | ||
0.0.1 / 2014-01-01 | ||
@@ -2,0 +7,0 @@ ================== |
@@ -218,5 +218,4 @@ /** | ||
// other == 1 or this == 1 | ||
if ((other._high == 0 && other._low == 1) || (this._high == 0 && this._low == 1)) | ||
return this | ||
// other == 1 | ||
if (other._high == 0 && other._low == 1) return this | ||
@@ -223,0 +222,0 @@ // other > this: 0 |
{ | ||
"name": "cuint", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "Unsigned integers for Javascript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -27,2 +27,13 @@ var assert = require('assert') | ||
it('should return 0', function (done) { | ||
var u = UINT32(2).div( UINT32(1) ) | ||
assert.equal( u.toNumber(), 2 ) | ||
done() | ||
}) | ||
}) | ||
describe('2/1', function () { | ||
it('should return 2', function (done) { | ||
var u = UINT32(0).div( UINT32(1) ) | ||
@@ -36,2 +47,13 @@ | ||
describe('1/2', function () { | ||
it('should return 0', function (done) { | ||
var u = UINT32(1).div( UINT32(2) ) | ||
assert.equal( u.toNumber(), 0 ) | ||
done() | ||
}) | ||
}) | ||
describe('low bit/high bit', function () { | ||
@@ -38,0 +60,0 @@ |
68895
30
2312