Skip to content

Commit

Permalink
TEST: added tests for degree
Browse files Browse the repository at this point in the history
  • Loading branch information
olynch committed Mar 25, 2022
1 parent 687d273 commit a0d3bc7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/graphs/BasicGraphs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ add_edge!(g, 2, 3)
@test !has_edge(g, 1, 3)
@test outneighbors(g, 2) == [3]
@test inneighbors(g, 2) == [1]
@test degree(g, 2) == 2
@test collect(all_neighbors(g, 2)) == [1,3]

add_edge!(g, 1, 2)
Expand All @@ -31,6 +32,7 @@ add_edge!(g, 1, 2)
@test collect(edges(g, 1, 2)) == [1,3]
@test outneighbors(g, 1) == [2,2]
@test inneighbors(g, 1) == []
@test degree(g, 1) == []
@test LG.DiGraph(g) == LG.path_digraph(3)

g = Graph(4)
Expand Down

0 comments on commit a0d3bc7

Please sign in to comment.