From dfae4647ee373628620ebb330646b2e1879de010 Mon Sep 17 00:00:00 2001 From: Mojca Miklavec Date: Wed, 21 May 2014 10:08:33 +0000 Subject: 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 --- Build/source/utils/asymptote/tests/arith/random.asy | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Build/source/utils/asymptote/tests/arith/random.asy (limited to 'Build/source/utils/asymptote/tests') 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(); -- cgit v1.2.3