Last change
on this file since 256 was
256,
checked in by hendrikvanantwerpen, 13 years ago
|
Reworked project structure based on REST interaction and Dojo library. As
soon as this is stable, the old jQueryUI branch can be removed (it's
kept for reference).
|
File size:
641 bytes
|
Line | |
---|
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 | ); |
---|
Note: See
TracBrowser
for help on using the repository browser.