MCPcopy Create free account
hub / github.com/cogentcore/core / TestNodePathFrom

Function TestNodePathFrom

tree/node_test.go:80–88  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

78}
79
80func TestNodePathFrom(t *testing.T) {
81 a := NewNodeBase().SetName("a")
82 b := NewNodeBase(a).SetName("b")
83 c := NewNodeBase(b).SetName("c")
84 d := NewNodeBase(c).SetName("d")
85 NewNodeBase(d).SetName("e")
86
87 assert.Equal(t, "c/d", d.PathFrom(b))
88}
89
90func TestNodeDeleteChild(t *testing.T) {
91 parent := NewNodeBase()

Callers

nothing calls this directly

Calls 4

EqualMethod · 0.80
PathFromMethod · 0.80
NewNodeBaseFunction · 0.70
SetNameMethod · 0.65

Tested by

no test coverage detected