From 2a829c4525150fd49d0243c9f980ae175323f67e Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Wed, 23 Apr 2014 15:06:11 -0300 Subject: [PATCH] reduce number of cases for browser --- test/index.html | 1 + test/test.random.js | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/test/index.html b/test/index.html index 551c46d80..6a864096d 100644 --- a/test/index.html +++ b/test/index.html @@ -32,6 +32,7 @@ + diff --git a/test/test.random.js b/test/test.random.js index b52c5cb05..d903268e3 100644 --- a/test/test.random.js +++ b/test/test.random.js @@ -9,7 +9,7 @@ var should = chai.should(); var Key = bitcore.Key; describe('Key randomness tests', function() { - var RUNS = 128; + var RUNS = 32; it('should pass Frequency (Monobits) Test', function() { /* Description: The focus of the test is the proportion @@ -61,17 +61,14 @@ describe('Key randomness tests', function() { (p1-0.5).should.be.below(0.01); }); var getBitInByte = function(b, index) { - index.should.be.below(8); return (b >> index) & 1; }; var getBitInKey = function(key, index) { var bindex = parseInt(index / 8); - bindex.should.be.below(key.length); return getBitInByte(key[bindex], index - bindex * 8); }; var getBitInKeys = function(keys, index) { var kindex = parseInt(index / (keys[0].length*8)); - kindex.should.be.below(keys.length); return getBitInKey(keys[kindex], index - (keys[0].length*8) * kindex); }; it('should pass Runs Test', function() {