summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/tests/arith/random.asy
blob: c972744da4ff77acade4e266adfc354e4f7e00c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
import TestLib;
StartTest("random");
bool bit32=false;
for(int i=0; i < 1000; ++i) {
  real x=unitrand();
  if(x > 0.5) bit32=true;
  assert(x >= 0.0 && x <= 1.0);
}
assert(bit32);

EndTest();