Skip to content

Commit 02cb414

Browse files
committed
re-add BigInt tests from commit bf8c452
1 parent cd44752 commit 02cb414

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/random.jl

+14
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,20 @@ if sizeof(Int32) < sizeof(Int)
5353

5454
end
5555

56+
# BigInt specific
57+
s = big(typemax(Uint128)-1000):(big(typemax(Uint128)) + 10000)
58+
@test rand(s) != rand(s)
59+
@test big(typemax(Uint128)-1000) <= rand(s) <= big(typemax(Uint128)) + 10000
60+
r = rand(s, 1, 2)
61+
@test size(r) == (1, 2)
62+
@test typeof(r) == Matrix{BigInt}
63+
64+
srand(0)
65+
r = rand(s)
66+
srand(0)
67+
@test rand(s) == r
68+
69+
5670
randn(100000)
5771
randn!(Array(Float64, 100000))
5872
randn(MersenneTwister(10), 100000)

0 commit comments

Comments
 (0)