Skip to content

Commit

Permalink
re-add BigInt tests from commit bf8c452
Browse files Browse the repository at this point in the history
  • Loading branch information
rfourquet committed Sep 18, 2014
1 parent cd44752 commit 02cb414
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/random.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 02cb414

Please sign in to comment.