Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
mschauer authored Apr 4, 2020
1 parent 549c402 commit 9b9da52
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/iterators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ let z = zip(1:2, Iterators.countfrom(3))
@test eltype(z) == Tuple{Int,Int}
@test_throws MethodError size(z) # by convention, the zip of a finite and
# an infinite iterator has only `length`
@test_throws MethodError axes(z)
@test length(z) == 2
end

Expand All @@ -39,6 +40,7 @@ let z = zip([i*j for i in 1:3, j in -1:2:1], 1:6)
(3, 6) ]
@test eltype(z) == Tuple{Int,Int}
@test_throws DimensionMismatch size(z)
@test_throws DimensionMismatch axes(z)
@test length(z) == 6
end

Expand All @@ -48,6 +50,7 @@ let z = zip([i*j for i in 1:3, j in -1:2:1], [i*j for i in 1:3, j in -1:2:1])
(-3, -3) (3, 3)]
@test eltype(z) == Tuple{Int,Int}
@test size(z) == (3, 2)
@test axes(z) == (Base.OneTo(3), Base.OneTo(2))
@test length(z) == 6
end

Expand Down

0 comments on commit 9b9da52

Please sign in to comment.