From 766db29f7c14cb145bae8e643cb2f08d4e0fa435 Mon Sep 17 00:00:00 2001 From: Rafael Fourquet Date: Wed, 10 Sep 2014 16:08:38 +0530 Subject: [PATCH] re-add BigInt tests from commit bf8c452112 --- test/random.jl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/random.jl b/test/random.jl index 7a036e18b41db..c10c1cae74dcd 100644 --- a/test/random.jl +++ b/test/random.jl @@ -53,6 +53,20 @@ if sizeof(Int32) < sizeof(Int) end +# BigInt specific +s = big(typemax(Uint128)-1000):(big(typemax(Uint128)) + 10000) +@test rand(s) != rand(s) +@test big(typemax(Uint128)-1000) <= rand(s) <= big(typemax(Uint128)) + 10000 +r = rand(s, 1, 2) +@test size(r) == (1, 2) +@test typeof(r) == Matrix{BigInt} + +srand(0) +r = rand(s) +srand(0) +@test rand(s) == r + + randn(100000) randn!(Array(Float64, 100000)) randn(MersenneTwister(10), 100000)