|
70 | 70 | @test compare(A->maximum(A; dims=dims), AT, rand(range, sz))
|
71 | 71 | end
|
72 | 72 | end
|
73 |
| - OT = isbitstype(widen(ET)) ? widen(ET) : ET |
74 | 73 | for (sz,red) in [(10,)=>(1,), (10,10)=>(1,1), (10,10,10)=>(1,1,1), (10,10,10)=>(10,10,10),
|
75 | 74 | (10,10,10)=>(1,10,10), (10,10,10)=>(10,1,10), (10,10,10)=>(10,10,1)]
|
76 | 75 | if !(ET <: Complex)
|
77 | 76 | @test compare((A,R)->minimum!(R, A), AT, rand(range, sz), fill(typemax(ET), red))
|
78 | 77 | @test compare((A,R)->maximum!(R, A), AT, rand(range, sz), fill(typemin(ET), red))
|
79 | 78 | end
|
80 | 79 | 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 |
86 | 88 | end
|
87 | 89 | end
|
88 | 90 |
|
|
0 commit comments