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

Function TestNodeDeleteChild

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

Source from the content-addressed store, hash-verified

88}
89
90func TestNodeDeleteChild(t *testing.T) {
91 parent := NewNodeBase()
92 child := NewNodeBase(parent)
93 assert.Len(t, parent.Children, 1)
94 assert.True(t, parent.DeleteChild(child))
95 assert.Len(t, parent.Children, 0)
96}
97
98func TestNodeDeleteChildByName(t *testing.T) {
99 parent := NewNodeBase()

Callers

nothing calls this directly

Calls 3

DeleteChildMethod · 0.95
NewNodeBaseFunction · 0.70
LenMethod · 0.65

Tested by

no test coverage detected