Skip to content

Commit ad86772

Browse files
authored
test: eachindex for arbitrary number of arguments (#51941)
added test cases for `eachindex` to cover arbitrary number of arguments ![image](https://github.com/JuliaLang/julia/assets/49565677/fa39cb8c-2523-40c0-90f3-e3f90f54397e)
1 parent 7c74274 commit ad86772

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/arrayops.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2128,6 +2128,8 @@ R = CartesianIndices((3,0))
21282128
@test @inferred(eachindex(Base.IndexLinear(), a, b)) == 1:4
21292129
@test @inferred(eachindex(a, b)) == CartesianIndices((2,2))
21302130
@test @inferred(eachindex(a, a)) == 1:4
2131+
@test @inferred(eachindex(a, a, a)) == 1:4
2132+
@test @inferred(eachindex(a, a, b)) == CartesianIndices((2,2))
21312133
@test_throws DimensionMismatch eachindex(a, rand(3,3))
21322134
@test_throws DimensionMismatch eachindex(b, rand(3,3))
21332135
end

0 commit comments

Comments
 (0)