Skip to content

Commit 20925a1

Browse files
committed
Add tests for extrema for 1-range ProductSplit
1 parent 410b496 commit 20925a1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

test/runtests.jl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ end
173173
@test begin
174174
res = fn(ps,dim=dim) == fn(x[dim] for x in pcol)
175175
if !res
176-
println("ProductSplit(",iters,",",np,",",p,")")
176+
println(summary(ps))
177177
end
178178
res
179179
end
@@ -182,9 +182,16 @@ end
182182
end
183183

184184
for iters in various_iters, fn in [maximum,minimum,extrema]
185-
186185
checkPSextrema(iters,fn)
187186
end
187+
188+
@test minimum(ProductSplit((1:5,),2,1)) == 1
189+
@test maximum(ProductSplit((1:5,),2,1)) == 3
190+
@test extrema(ProductSplit((1:5,),2,1)) == (1,3)
191+
192+
@test minimum(ProductSplit((1:5,),2,2)) == 4
193+
@test maximum(ProductSplit((1:5,),2,2)) == 5
194+
@test extrema(ProductSplit((1:5,),2,2)) == (4,5)
188195
end
189196

190197
@testset "extremadims" begin

0 commit comments

Comments
 (0)