Skip to content

Commit 6eb927d

Browse files
committed
tests empty digraph
1 parent 0465bcc commit 6eb927d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/runtests.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const testdir = dirname(@__FILE__)
1818
sg = StaticGraph(g)
1919
sgu = StaticGraph(gu)
2020
gempty = StaticGraph()
21+
gdempty = StaticDiGraph()
2122
@test sprint(show, sg) == "{5, 6} undirected simple static {UInt8, UInt8} graph"
2223
@test sprint(show, sgu) == "{5, 6} undirected simple static {UInt8, UInt8} graph"
2324
testfn(fn, args...) =
@@ -50,9 +51,12 @@ const testdir = dirname(@__FILE__)
5051
@test @inferred !is_directed(hu)
5152
@test @inferred !is_directed(StaticGraph)
5253
@test @inferred collect(edges(hu)) == collect(edges(sg))
53-
@test nv(gempty) == 0
54+
# empty constructors
55+
@test nv(gempty) === 0x00
5456
@test typeof(LightGraphs.nv(gempty)) == UInt8
5557
@test length(LightGraphs.edges(gempty)) === 0x00
58+
@test nv(gdempty) === 0x00
59+
@test length(LightGraphs.edges(gdempty)) === 0x00
5660
end # staticgraph
5761

5862
@testset "staticdigraph" begin

0 commit comments

Comments
 (0)