Skip to content

Commit

Permalink
test update
Browse files Browse the repository at this point in the history
  • Loading branch information
PharmCat committed May 8, 2023
1 parent ee3876a commit 213339d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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]
Expand Down

0 comments on commit 213339d

Please sign in to comment.