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

Function testNodeTree

tree/io_test.go:18–31  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16)
17
18func testNodeTree() *testdata.NodeEmbed {
19 parent := testdata.NewNodeEmbed()
20 parent.Mbr1 = "bloop"
21 parent.Mbr2 = 32
22 child1 := testdata.NewNodeEmbed(parent)
23 child1.SetName("child1")
24 child2 := testdata.NewNodeEmbed(parent)
25 child2.SetName("child2")
26 child3 := testdata.NewNodeEmbed(parent)
27 child3.SetName("child3")
28 schild1 := testdata.NewNodeEmbed(child2)
29 schild1.SetName("subchild1")
30 return parent
31}
32
33func TestNodeJSON(t *testing.T) {
34 parent := testNodeTree()

Callers 4

TestNodeJSONFunction · 0.85
TestNodeRootJSONFunction · 0.85
BenchmarkNodeMarshalJSONFunction · 0.85

Calls 2

NewNodeEmbedFunction · 0.92
SetNameMethod · 0.65

Tested by

no test coverage detected