Skip to content

Commit

Permalink
Add in species name tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
richardreeve committed Apr 4, 2017
1 parent 799814e commit 0d1f473
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/Metacommunity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ tax = Taxonomy(DataFrame(Species=["This", "That"]), Dict(:Species=>1.0))
Dict(:Species=>1.0, :Genus=>0.5))
end

@testset "Type names" begin
@test !Diversity.hasnames(Species(3))
@test Diversity.hasnames(Species(["My species"]))
@test Diversity.getnames(GeneralTypes(eye(1), ["My species"])) == ["My species"]
@test Diversity.getnames(UniqueTypes(["One", "Two"])) == ["One", "Two"]
end

sc = Subcommunities(size(ab3, 2))
meta = Metacommunity(three, ms, oc_count)
sp = Species(size(ab3, 1))
Expand Down

0 comments on commit 0d1f473

Please sign in to comment.