Skip to content

Commit 358f2ef

Browse files
JeffBezansontkelman
authored andcommitted
add a test for reading 128 bit ints from RandomDevice
1 parent b0cf837 commit 358f2ef

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/random.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,11 @@ let mt = MersenneTwister()
286286
end
287287
end
288288

289+
# make sure reading 128-bit ints from RandomDevice works
290+
let a = [rand(RandomDevice(), UInt128) for i=1:10]
291+
@test reduce(|, a)>>>64 != 0
292+
end
293+
289294
# test all rand APIs
290295
for rng in ([], [MersenneTwister()], [RandomDevice()])
291296
for f in [rand, randn, randexp]

0 commit comments

Comments
 (0)