diff options
Diffstat (limited to 'Build/source/utils/asymptote/tests/arith/random.asy')
-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(); |