From c0d4474accf6a9bc068d10e5b6bc757defbfe7dd Mon Sep 17 00:00:00 2001 From: Owen Lynch Date: Fri, 25 Mar 2022 19:48:38 -0400 Subject: [PATCH] TEST: added tests for degree --- test/graphs/BasicGraphs.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/graphs/BasicGraphs.jl b/test/graphs/BasicGraphs.jl index c1be06f8d..7c1903131 100644 --- a/test/graphs/BasicGraphs.jl +++ b/test/graphs/BasicGraphs.jl @@ -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) @@ -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)