MCPcopy Create free account
hub / github.com/IChooseYou/Reclass / makeTestTree

Function makeTestTree

tests/test_rendered_view.cpp:80–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78// ── Test tree helper ──
79
80static rcx::NodeTree makeTestTree() {
81 rcx::NodeTree tree;
82 rcx::Node root;
83 root.kind = rcx::NodeKind::Struct;
84 root.name = "TestStruct";
85 root.structTypeName = "TestStruct";
86 root.parentId = 0;
87 root.offset = 0;
88 int ri = tree.addNode(root);
89 uint64_t rootId = tree.nodes[ri].id;
90
91 rcx::Node f1;
92 f1.kind = rcx::NodeKind::Int32;
93 f1.name = "health";
94 f1.parentId = rootId;
95 f1.offset = 0;
96 tree.addNode(f1);
97
98 rcx::Node f2;
99 f2.kind = rcx::NodeKind::Float;
100 f2.name = "speed";
101 f2.parentId = rootId;
102 f2.offset = 4;
103 tree.addNode(f2);
104
105 return tree;
106}
107
108// ── Test class ──
109

Callers 1

Calls 1

addNodeMethod · 0.45

Tested by

no test coverage detected