File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 9696 @test @inferred (density (g)) == 0.4
9797 end
9898 end
99+
100+ @testset " squash" for (g_in, g_expected) in [
101+ (SimpleGraph {Int64} (), SimpleGraph {UInt8} ()),
102+ (SimpleDiGraph {UInt8} (), SimpleDiGraph {UInt8} ()),
103+ (path_graph (Int16 (126 )), path_graph (UInt8 (126 ))),
104+ (path_digraph (Int16 (127 )), path_digraph (UInt8 (127 ))),
105+ (path_graph (Int16 (254 )), path_graph (UInt8 (254 ))),
106+ (path_digraph (Int16 (255 )), path_digraph (UInt16 (255 ))),
107+ (path_graph (UInt16 (255 )), path_graph (UInt16 (255 ))),
108+ (star_graph (Int16 (32766 )), star_graph (UInt16 (32766 ))),
109+ (star_digraph (Int32 (32767 )), star_digraph (UInt16 (32767 ))),
110+ (cycle_graph (Int128 (123 )), cycle_graph (UInt8 (123 ))),
111+ ]
112+ g_actual = squash (generic_graph (g_in))
113+ @test typeof (g_actual) === typeof (g_expected)
114+ @test g_actual == g_expected
115+ end
99116end
You can’t perform that action at this time.
0 commit comments