MCPcopy
hub / github.com/pterm/pterm / TestTreePrinter_Render

Function TestTreePrinter_Render

tree_printer_test.go:20–33  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

18}
19
20func TestTreePrinter_Render(t *testing.T) {
21 pterm.DefaultTree.WithRoot(pterm.NewTreeFromLeveledList([]pterm.LeveledListItem{
22 {Level: 0, Text: "Hello, World!"},
23 {Level: 0, Text: "0.0"},
24 {Level: 1, Text: "0.1"},
25 {Level: 1, Text: "0.2"},
26 {Level: 0, Text: "1.0"},
27 {Level: 0, Text: "2.0"},
28 {Level: 1, Text: "2.1"},
29 {Level: 1, Text: "2.2"},
30 {Level: 2, Text: "2.2.1"},
31 {Level: 1, Text: "2.3"},
32 })).Render()
33}
34
35func TestTreePrinter_NewTreeFromLeveledList(t *testing.T) {
36 p := pterm.DefaultTree

Callers

nothing calls this directly

Calls 3

NewTreeFromLeveledListFunction · 0.92
WithRootMethod · 0.80
RenderMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…