Debian Codegraph @

dojox/math/tests/random.js

raw symbols SCIP
1 dojo.provide("dojox.math.tests.random");
2
3 dojo.require("dojox.math.random.Simple");
4 dojo.require("dojox.math.random.Secure");
5 dojo.require("dojox.math.random.prng4");
6
7 tests.register("dojox.math.tests.random",
8 [
9 function sanity_check_Simple(t){
10 var r = new dojox.math.random.Simple(),
11 a = new Array(256);
12 r.nextBytes(a);
13 t.f(dojo.every(a, function(x){ return x === a[0]; }));
14 r.destroy();
15 },
16 function sanity_check_Secure(t){
17 var r = new dojox.math.random.Secure(dojox.math.random.prng4),
18 a = new Array(256);
19 r.nextBytes(a);
20 t.f(dojo.every(a, function(x){ return x === a[0]; }));
21 r.destroy();
22 }
23 ]
24 );