We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2905da7 commit b869a57Copy full SHA for b869a57
test/runtests.jl
@@ -30,4 +30,21 @@ using Test
30
include(joinpath("tutorial", "4_type_stability.jl"))
31
end
32
33
+
34
+ @testset verbose = true "Short-form add_vertex!/add_edge!" begin
35
+ # short-form
36
+ mg = MetaGraph(Graph(); Label=Symbol, VertexData=Nothing, EdgeData=Nothing)
37
+ @test add_vertex!(mg, :A)
38
+ @test add_vertex!(mg, :B)
39
+ @test add_edge!(mg, :A, :B)
40
41
+ # long-form
42
+ mg′ = MetaGraph(Graph(); Label=Symbol, VertexData=Nothing, EdgeData=Nothing)
43
+ @test add_vertex!(mg′, :A, nothing)
44
+ @test add_vertex!(mg′, :B, nothing)
45
+ @test add_edge!(mg′, :A, :B, nothing)
46
47
+ # compare
48
+ @test mg == mg′
49
+ end
50
0 commit comments