-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_test.go
More file actions
39 lines (33 loc) · 803 Bytes
/
dot_test.go
File metadata and controls
39 lines (33 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package gorax_test
import (
_ "embed"
"strings"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/snorwin/gorax"
)
//go:embed example.dot
var example string
var _ = Describe("Tree", func() {
Context("ToDOTGraph", func() {
It("should_generate_graph_regression_test", func() {
t := gorax.FromMap(map[string]interface{}{
"alligator": nil,
"alien": 1,
"baloon": 2,
"chromodynamic": 3,
"romane": 4,
"romanus": 5,
"romulus": 6,
"rubens": 7,
"ruber": 8,
"rubicon": 9,
"rubicundus": "a",
"all": "b",
"rub": "c",
"ba": "d",
})
Ω(strings.ReplaceAll(t.ToDOTGraph().String(), "\t\n", "\n")).Should(Equal(example))
})
})
})