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

Method testInsertChildIntoStruct

tests/test_context_menu.cpp:250–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248 // ── Insert child into struct ──
249
250 void testInsertChildIntoStruct() {
251 uint64_t rootId = m_doc->tree.nodes[0].id;
252 int before = countNodes();
253
254 m_ctrl->insertNode(rootId, 0, NodeKind::Hex64, "childField");
255 QApplication::processEvents();
256
257 QCOMPARE(countNodes(), before + 1);
258 int idx = findNode("childField");
259 QVERIFY(idx >= 0);
260 QCOMPARE(m_doc->tree.nodes[idx].parentId, rootId);
261 QCOMPARE(m_doc->tree.nodes[idx].offset, 0);
262 }
263
264 // ── Remove node then undo restores it ──
265

Callers

nothing calls this directly

Calls 2

findNodeFunction · 0.85
insertNodeMethod · 0.80

Tested by

no test coverage detected