File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ An abstract type representing a simple graph structure.
5050"""
5151abstract type AbstractSimpleGraph{T<: Integer } <: AbstractGraph{T} end
5252
53- function show (io:: IO , g:: AbstractSimpleGraph{T} ) where T
53+ function show (io:: IO , :: MIME"text/plain" , g:: AbstractSimpleGraph{T} ) where T
5454 dir = is_directed (g) ? " directed" : " undirected"
5555 print (io, " {$(nv (g)) , $(ne (g)) } $dir simple $T graph" )
5656end
Original file line number Diff line number Diff line change @@ -30,16 +30,18 @@ import Random
3030 gx = SimpleGraph ()
3131 for g in testgraphs (gx)
3232 T = eltype (g)
33- @test sprint (show , g) == " {0, 0} undirected simple $T graph"
33+ @test repr ( " text/plain " , g) == " {0, 0} undirected simple $T graph"
3434 @test @inferred (add_vertices! (g, 5 ) == 5 )
35- @test sprint (show, g) == " {5, 0} undirected simple $T graph"
35+ @test repr (" text/plain" , g) == " {5, 0} undirected simple $T graph"
36+ @test eval (Meta. parse (repr (g))) == g
3637 end
3738 gx = SimpleDiGraph ()
3839 for g in testdigraphs (gx)
3940 T = eltype (g)
40- @test sprint (show , g) == " {0, 0} directed simple $T graph"
41+ @test repr ( " text/plain " , g) == " {0, 0} directed simple $T graph"
4142 @test @inferred (add_vertices! (g, 5 ) == 5 )
42- @test sprint (show, g) == " {5, 0} directed simple $T graph"
43+ @test repr (" text/plain" , g) == " {5, 0} directed simple $T graph"
44+ @test eval (Meta. parse (repr (g))) == g
4345 end
4446
4547 gx = path_graph (4 )
You can’t perform that action at this time.
0 commit comments