Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bkamins authored and simonschoelly committed Jan 9, 2022
1 parent 81a3284 commit 8bbf1c5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,14 @@
@test h2 == h
@test vm == collect(r)
@test h2 == g[r]

r2 = falses(length(g))
r2[r] .= true
h2, vm = @inferred(induced_subgraph(g, r2))
@test h2 == h
@test vm == findall(r2)
@test h2 == g[r2]

end

g10 = complete_graph(10)
Expand All @@ -285,6 +293,12 @@
@test sg2 == sg
@test vm[4] == 8

bv = falses(length(g))
bv[5:8] .= true
sg2, vm = @inferred(induced_subgraph(g, bv))
@test sg2 == sg
@test vm[4] == 8

elist = [
SimpleEdge(1, 2), SimpleEdge(2, 3), SimpleEdge(3, 4),
SimpleEdge(4, 5), SimpleEdge(5, 1)
Expand Down

0 comments on commit 8bbf1c5

Please sign in to comment.