Skip to content

Commit 91d10ea

Browse files
authored
Don't test complex randn. (#376)
1 parent e1856fe commit 91d10ea

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

test/testsuite.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ supported_eltypes() = (Int16, Int32, Int64,
5454
# some convenience predicates for filtering test eltypes
5555
isrealtype(T) = T <: Real
5656
iscomplextype(T) = T <: Complex
57+
isrealfloattype(T) = T <: AbstractFloat
5758
isfloattype(T) = T <: AbstractFloat || T <: Complex{<:AbstractFloat}
5859

5960
# list of tests

test/testsuite/random.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
end
3232

3333
@testset "randn" begin # normally-distributed
34-
for T in filter(isfloattype, eltypes), d in (2, (2,2))
34+
# XXX: randn calls sqrt, and Base's sqrt(::Complex) performs
35+
# checked type conversions that throw boxed numbers.
36+
for T in filter(isrealfloattype, eltypes), d in (2, (2,2))
3537
A = AT{T}(undef, d)
3638
B = copy(A)
3739
randn!(rng, A)

0 commit comments

Comments
 (0)