source: Dev/trunk/src/client/dojox/math/tests/random.js @ 527

Last change on this file since 527 was 483, checked in by hendrikvanantwerpen, 11 years ago

Added Dojo 1.9.3 release.

File size: 641 bytes
Line 
1dojo.provide("dojox.math.tests.random");
2
3dojo.require("dojox.math.random.Simple");
4dojo.require("dojox.math.random.Secure");
5dojo.require("dojox.math.random.prng4");
6
7tests.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);
Note: See TracBrowser for help on using the repository browser.