Skip to content

Commit

Permalink
tests for keys/eachindex
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub committed Jul 26, 2020
1 parent 664eab2 commit 7e1b9d2
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ ModeRangesInconsistentError
l2_range = 5:8
mr = L₂L₁Δ(l_range, Δl_max, l2_range)
@test mr == L₂L₁Δ(2:10,3,5:8)
mr = L₂L₁Δ(extrema(l_range)..., Δl_max, l2_range)
@test mr == L₂L₁Δ(2:10,3,5:8)

l_range = 10:10
l2_range = 1:8
Expand All @@ -61,6 +63,20 @@ ModeRangesInconsistentError

@test eltype(m) == Tuple{Int,Int}
end

@testset "keys" begin
m = LM(1:2)
@test keys(m) == Base.OneTo(8)
@test eachindex(m) == Base.OneTo(8)

m = ML(1:2)
@test keys(m) == Base.OneTo(8)
@test eachindex(m) == Base.OneTo(8)

m = L₂L₁Δ(1:2,1)
@test keys(m) == Base.OneTo(6)
@test eachindex(m) == Base.OneTo(6)
end
end

@testset "length" begin
Expand Down

2 comments on commit 7e1b9d2

@jishnub
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/18461

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.4 -m "<description of version>" 7e1b9d25ab39aaecec00bfeef671a133270f57b2
git push origin v0.3.4

Please sign in to comment.