Skip to content

Commit 78afd1a

Browse files
committed
Don't widen to int128 in tests.
1 parent 60294ff commit 78afd1a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

test/testsuite/mapreduce.jl

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,21 @@ end
7070
@test compare(A->maximum(A; dims=dims), AT, rand(range, sz))
7171
end
7272
end
73-
OT = isbitstype(widen(ET)) ? widen(ET) : ET
7473
for (sz,red) in [(10,)=>(1,), (10,10)=>(1,1), (10,10,10)=>(1,1,1), (10,10,10)=>(10,10,10),
7574
(10,10,10)=>(1,10,10), (10,10,10)=>(10,1,10), (10,10,10)=>(10,10,1)]
7675
if !(ET <: Complex)
7776
@test compare((A,R)->minimum!(R, A), AT, rand(range, sz), fill(typemax(ET), red))
7877
@test compare((A,R)->maximum!(R, A), AT, rand(range, sz), fill(typemin(ET), red))
7978
end
8079
end
81-
# smaller-scale test to avoid very large values and roundoff issues
82-
for (sz,red) in [(2,)=>(1,), (2,2)=>(1,1), (2,2,2)=>(1,1,1), (2,2,2)=>(2,2,2),
83-
(2,2,2)=>(1,2,2), (2,2,2)=>(2,1,2), (2,2,2)=>(2,2,1)]
84-
@test compare((A,R)->sum!(R, A), AT, rand(range, sz), rand(OT, red))
85-
@test compare((A,R)->prod!(R, A), AT, rand(range, sz), rand(OT, red))
80+
OT = isbitstype(widen(ET)) ? widen(ET) : ET
81+
if OT in supported_eltypes()
82+
# smaller-scale test to avoid very large values and roundoff issues
83+
for (sz,red) in [(2,)=>(1,), (2,2)=>(1,1), (2,2,2)=>(1,1,1), (2,2,2)=>(2,2,2),
84+
(2,2,2)=>(1,2,2), (2,2,2)=>(2,1,2), (2,2,2)=>(2,2,1)]
85+
@test compare((A,R)->sum!(R, A), AT, rand(range, sz), rand(OT, red))
86+
@test compare((A,R)->prod!(R, A), AT, rand(range, sz), rand(OT, red))
87+
end
8688
end
8789
end
8890

0 commit comments

Comments
 (0)