Skip to content

Commit f55747a

Browse files
authored
Merge pull request #526 from JuliaParallel/jps/tests-rand-some-zeros
tests: Fix assumption that rand won't return 0
2 parents a63bbd9 + a166e23 commit f55747a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: test/array/allocation.jl

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ end
4040
@test AX == collect(X)
4141
@test AX != collect(rand(dist, T, dims...))
4242
if T <: AbstractFloat
43-
@test all(AX .> 0)
43+
# FIXME: Not ideal, but I guess sometimes we can get 0?
44+
@test sum(.!(AX .> 0)) < 10
4445
end
4546

4647
if T in [Float32, Float64]

0 commit comments

Comments
 (0)