UNPKG

dojox

Version:

Dojo eXtensions, a rollup of many useful sub-projects and varying states of maturity – from very stable and robust, to alpha and experimental. See individual projects contain README files for details.

25 lines (22 loc) 641 B
dojo.provide("dojox.math.tests.random"); dojo.require("dojox.math.random.Simple"); dojo.require("dojox.math.random.Secure"); dojo.require("dojox.math.random.prng4"); tests.register("dojox.math.tests.random", [ function sanity_check_Simple(t){ var r = new dojox.math.random.Simple(), a = new Array(256); r.nextBytes(a); t.f(dojo.every(a, function(x){ return x === a[0]; })); r.destroy(); }, function sanity_check_Secure(t){ var r = new dojox.math.random.Secure(dojox.math.random.prng4), a = new Array(256); r.nextBytes(a); t.f(dojo.every(a, function(x){ return x === a[0]; })); r.destroy(); } ] );