package drawing import ( "testing" ) var strTree = &StringTree{ Data: "gma", Children: []*StringTree{ { Data: "dad", Children: []*StringTree{ { Data: "me", Children: []*StringTree{ { Data: "leif", Children: []*StringTree{ { Data: "leif jr", Children: []*StringTree{{Data: "leif jr jr"}}, }, }, }, { Data: "toxic", Children: []*StringTree{{Data: "toxic jr"}}, }, { Data: "tupelo", Children: []*StringTree{{Data: "tupelo jr"}}, }, }, }, { Data: "brother", Children: []*StringTree{{Data: "niece"}}, }, }, }, { Data: "aunt", Children: []*StringTree{ {Data: "cousin_nochild"}, { Data: "cousin_withchild", Children: []*StringTree{{Data: "first_cousin-1"}}, }, }, }, { Data: "uncle", Children: []*StringTree{ {Data: "cousin1"}, {Data: "cousin2"}, }, }, }, } func TestPrintTree(_ *testing.T) { strTree.Print() } func dotTree() *DotTree { // TODO: impl and replace with functions for graph manipulation dep1 := &DotNode{Data: "dep1"} dep2 := &DotNode{Data: "dep2"} root := &DotNode{ Data: "some pallet digraph", Children: []*DotNode{ dep1, dep2, }, } nodes := map[string]*DotNode{ dep1.Data: dep1, dep2.Data: dep2, root.Data: root, } return &DotTree{ Root: root, Nodes: nodes, } } func TestPrintDot(_ *testing.T) { dotTree().Print() }