| 89 | // ── Insert adds exactly one node ── |
| 90 | |
| 91 | void testInsertAddsOneNode() { |
| 92 | int before = countNodes(); |
| 93 | uint64_t rootId = m_doc->tree.nodes[0].id; |
| 94 | m_ctrl->insertNode(rootId, 16, NodeKind::Hex64, "inserted"); |
| 95 | QApplication::processEvents(); |
| 96 | |
| 97 | QCOMPARE(countNodes(), before + 1); |
| 98 | |
| 99 | int idx = findNode("inserted"); |
| 100 | QVERIFY(idx >= 0); |
| 101 | QCOMPARE(m_doc->tree.nodes[idx].kind, NodeKind::Hex64); |
| 102 | QCOMPARE(m_doc->tree.nodes[idx].offset, 16); |
| 103 | QCOMPARE(m_doc->tree.nodes[idx].parentId, rootId); |
| 104 | } |
| 105 | |
| 106 | // ── Insert at auto-offset places after last sibling ── |
| 107 |
nothing calls this directly
no test coverage detected