mirror of
https://github.com/gonum/gonum.git
synced 2025-10-16 04:00:48 +08:00
graph/encoding/dot: add tests for empty graphs
This commit is contained in:
@@ -424,6 +424,20 @@ var encodeTests = []struct {
|
||||
|
||||
want string
|
||||
}{
|
||||
// Empty graph.
|
||||
{
|
||||
name: "Empty Undirected",
|
||||
g: simple.NewUndirectedGraph(),
|
||||
want: `strict graph "Empty Undirected" {
|
||||
}`,
|
||||
},
|
||||
{
|
||||
name: "Empty Directed",
|
||||
g: simple.NewDirectedGraph(),
|
||||
want: `strict digraph "Empty Directed" {
|
||||
}`,
|
||||
},
|
||||
|
||||
// Basic graph.Graph handling.
|
||||
{
|
||||
name: "PageRank",
|
||||
|
Reference in New Issue
Block a user