Skip to content

Commit 317548a

Browse files
committed
Add simple tests for Core.Compiler.extrema
1 parent 2d70b7d commit 317548a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/reduce.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,15 +255,18 @@ prod2(itr) = invoke(prod, Tuple{Any}, itr)
255255
@test minimum(5) == 5
256256
@test extrema(5) == (5, 5)
257257
@test extrema(abs2, 5) == (25, 25)
258+
@test Core.Compiler.extrema(abs2, 5) == (25, 25)
258259

259260
let x = [4,3,5,2]
260261
@test maximum(x) == 5
261262
@test minimum(x) == 2
262263
@test extrema(x) == (2, 5)
264+
@test Core.Compiler.extrema(x) == (2, 5)
263265

264266
@test maximum(abs2, x) == 25
265267
@test minimum(abs2, x) == 4
266268
@test extrema(abs2, x) == (4, 25)
269+
@test Core.Compiler.extrema(abs2, x) == (4, 25)
267270
end
268271

269272
@test maximum([-0.,0.]) === 0.0

0 commit comments

Comments
 (0)