Skip to content

Commit

Permalink
Extra tests
Browse files Browse the repository at this point in the history
  • Loading branch information
richardreeve committed Jan 5, 2024
1 parent 77df78d commit 8b8b420
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test_API.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ end
struct TestTree <: Phylo.AbstractTree{OneTree, OneRoot, String, TestNode, TestBranch}
end

import Phylo.API: _preferbranchobjects
_preferbranchobjects(::Type{<: TestTree}) = false

@testset "Check errors" begin
tt = TestTree();
tn = TestNode();
Expand All @@ -22,9 +25,12 @@ end
@test_throws ErrorException _getnodenames(tt)
@test_throws MethodError _nnodes(tt)
@test_throws ErrorException _getbranches(tt)
@test_throws ErrorException _getbranchnames(tt)
@test_throws ErrorException _nbranches(tt)
@test_throws MethodError _hasnode(tt, tn)
@test_throws ErrorException _hasnode(tt, "test")
@test_throws MethodError _hasbranch(tt, tb)
@test_throws ErrorException _hasbranch(tt, 1)
@test_throws ErrorException _hasinbound(tt, tn)
@test_throws ErrorException _getinbound(tt, tn)
@test_throws ErrorException _getoutbounds(tt, tn)
Expand Down

0 comments on commit 8b8b420

Please sign in to comment.