diff options
author | Mojca Miklavec <mojca.miklavec@gmail.com> | 2014-05-21 10:08:33 +0000 |
---|---|---|
committer | Mojca Miklavec <mojca.miklavec@gmail.com> | 2014-05-21 10:08:33 +0000 |
commit | dfae4647ee373628620ebb330646b2e1879de010 (patch) | |
tree | b7c919fe0bbc6a1e6e0857a3fcf17c68983e0bdd /Build/source/utils/asymptote/tests | |
parent | 783a761a9c97d8ba7360183ff19f3fa5c34cb7ef (diff) |
asymptote: fix random numbers on platforms like Solaris (with 16-bit RAND_MAX and 32-bit random())
git-svn-id: svn://tug.org/texlive/trunk@34169 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/asymptote/tests')
-rw-r--r-- | Build/source/utils/asymptote/tests/arith/random.asy | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/tests/arith/random.asy b/Build/source/utils/asymptote/tests/arith/random.asy new file mode 100644 index 00000000000..c972744da4f --- /dev/null +++ b/Build/source/utils/asymptote/tests/arith/random.asy @@ -0,0 +1,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(); |