diff --git a/test/runtests.jl b/test/runtests.jl index 6a8f291..928aca4 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -189,6 +189,11 @@ using Test, Tables, TypedTables, DataFrames, CSV @test collect(keys(itr1)) == [1, 2, 3, 6] @test length(itr1) == 4 + @test getindex(itr1, 1) == 1 + @test_nowarn eltype(itr1) + @test_throws ErrorException itr1[4] + @test_throws ErrorException itr1[5] + itr2 = MetidaBase.skipnonpositive(v1) for i in itr2 @test MetidaBase.ispositive(i) @@ -198,6 +203,14 @@ using Test, Tables, TypedTables, DataFrames, CSV @test collect(keys(itr2)) == [1, 2] @test length(itr2) == 2 + @test getindex(itr2, 2) == 2 + @test_nowarn eltype(itr2) + @test_throws ErrorException itr2[3] + @test_throws ErrorException itr2[4] + @test_throws ErrorException itr2[5] + @test_throws ErrorException itr2[6] + + ############################################################################ # OTHER @test MetidaBase.nonunique([1,2,3,3,4,5,6,6]) == [6,3]