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

Function TestNodeEmbedAddChild

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

Source from the content-addressed store, hash-verified

29}
30
31func TestNodeEmbedAddChild(t *testing.T) {
32 parent := testdata.NewNodeEmbed()
33 child := &testdata.NodeEmbed{}
34 parent.AddChild(child)
35 child.SetName("child1")
36 assert.Len(t, parent.Children, 1)
37 assert.Equal(t, parent, child.Parent)
38 assert.Equal(t, "/node-embed/child1", child.Path())
39}
40
41func TestNodeEmbedNewChild(t *testing.T) {
42 parent := testdata.NewNodeEmbed()

Callers

nothing calls this directly

Calls 6

NewNodeEmbedFunction · 0.92
EqualMethod · 0.80
SetNameMethod · 0.65
LenMethod · 0.65
AddChildMethod · 0.45
PathMethod · 0.45

Tested by

no test coverage detected