mirror of
https://github.com/gonum/gonum.git
synced 2025-10-20 05:54:41 +08:00
encoding/dot: make all simple graph marshalling strict
Also fix bug in order of emitting strict keyword.
This commit is contained in:

committed by
Dan Kortschak

parent
cc0c958a30
commit
609b9d63e8
@@ -27,7 +27,7 @@ var cliqueGraphTests = []struct {
|
||||
5: nil,
|
||||
6: nil,
|
||||
},
|
||||
want: `graph {
|
||||
want: `strict graph {
|
||||
// Node definitions.
|
||||
0 [nodes="[0 1 2 6]"];
|
||||
1 [nodes="[0 1 4 6]"];
|
||||
@@ -46,7 +46,7 @@ var cliqueGraphTests = []struct {
|
||||
},
|
||||
{
|
||||
g: batageljZaversnikGraph,
|
||||
want: `graph {
|
||||
want: `strict graph {
|
||||
// Node definitions.
|
||||
0 [nodes="[0]"];
|
||||
1 [nodes="[1 2]"];
|
||||
@@ -102,7 +102,7 @@ func TestCliqueGraph(t *testing.T) {
|
||||
dst := simple.NewUndirectedGraph()
|
||||
CliqueGraph(dst, g)
|
||||
|
||||
b, _ := dot.Marshal(dst, "", "", " ", false)
|
||||
b, _ := dot.Marshal(dst, "", "", " ")
|
||||
got := string(b)
|
||||
|
||||
if got != test.want {
|
||||
|
Reference in New Issue
Block a user