Skip to content

Commit 7469597

Browse files
eschnettvtjnash
authored andcommitted
Update tests for error messages
1 parent 2ea73c1 commit 7469597

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

test/reduce.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ prod2(itr) = invoke(prod, Tuple{Any}, itr)
251251

252252
# maximum & minimum & extrema
253253

254-
@test_throws "reducing over an empty" maximum(Int[])
254+
@test_throws "reducing with maximum over an empty" maximum(Int[])
255255
@test_throws "reducing over an empty" minimum(Int[])
256256
@test_throws "reducing over an empty" extrema(Int[])
257257

test/reducedim.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ end
184184
@test prod(A) === 1
185185
@test_throws ["reducing over an empty",
186186
"consider supplying `init`"] minimum(A)
187-
@test_throws "consider supplying `init`" maximum(A)
187+
@test_throws ["reducing with maximum over an empty",
188+
"prevent this error by supplying an `init`"] maximum(A)
188189

189190
@test isequal(sum(A, dims=1), zeros(Int, 1, 1))
190191
@test isequal(sum(A, dims=2), zeros(Int, 0, 1))

0 commit comments

Comments
 (0)