mirror of
https://github.com/gonum/gonum.git
synced 2025-10-16 20:20:41 +08:00
graph/encoding/dot: add tests for empty graphs
This commit is contained in:
@@ -424,6 +424,20 @@ var encodeTests = []struct {
|
|||||||
|
|
||||||
want string
|
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.
|
// Basic graph.Graph handling.
|
||||||
{
|
{
|
||||||
name: "PageRank",
|
name: "PageRank",
|
||||||
|
Reference in New Issue
Block a user