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

Method testInsertAutoOffset

tests/test_context_menu.cpp:108–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 // ── Insert at auto-offset places after last sibling ──
107
108 void testInsertAutoOffset() {
109 uint64_t rootId = m_doc->tree.nodes[0].id;
110
111 // Last child is "flags" at offset 12, size 4 → end = 16
112 m_ctrl->insertNode(rootId, -1, NodeKind::Hex64, "autoPlaced");
113 QApplication::processEvents();
114
115 int idx = findNode("autoPlaced");
116 QVERIFY(idx >= 0);
117 // Hex64 is 8-byte aligned, next aligned offset after 16 is 16
118 QCOMPARE(m_doc->tree.nodes[idx].offset, 16);
119 }
120
121 // ── Duplicate creates exactly one copy ──
122

Callers

nothing calls this directly

Calls 2

findNodeFunction · 0.85
insertNodeMethod · 0.80

Tested by

no test coverage detected