Skip to content

Commit 9a485eb

Browse files
authored
Add doctest to check that duplicate labels are not inserted
1 parent 7d645f9 commit 9a485eb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/src/tutorial_graphs.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@ julia> ne(copy(colors))
2929
julia> add_vertex!(colors, :white, "neutral")
3030
true
3131
32+
julia> nv(colors)
33+
3
34+
35+
julia> add_vertex!(colors, :white, "neutral")
36+
false
37+
38+
julia> nv(colors)
39+
3
40+
3241
julia> add_edge!(colors, 1, 3, :pink)
3342
true
3443

0 commit comments

Comments
 (0)