── Test: changeNodeKind changes type and undo restores ──
| 224 | |
| 225 | // ── Test: changeNodeKind changes type and undo restores ── |
| 226 | void testChangeNodeKind() { |
| 227 | int idx = -1; |
| 228 | for (int i = 0; i < m_doc->tree.nodes.size(); i++) { |
| 229 | if (m_doc->tree.nodes[i].name == "field_u32") { idx = i; break; } |
| 230 | } |
| 231 | QVERIFY(idx >= 0); |
| 232 | QCOMPARE(m_doc->tree.nodes[idx].kind, NodeKind::UInt32); |
| 233 | |
| 234 | m_ctrl->changeNodeKind(idx, NodeKind::Float); |
| 235 | QApplication::processEvents(); |
| 236 | |
| 237 | QCOMPARE(m_doc->tree.nodes[idx].kind, NodeKind::Float); |
| 238 | |
| 239 | // Undo |
| 240 | m_doc->undoStack.undo(); |
| 241 | QApplication::processEvents(); |
| 242 | QCOMPARE(m_doc->tree.nodes[idx].kind, NodeKind::UInt32); |
| 243 | } |
| 244 | |
| 245 | // ── Test: insertNode adds a node, removeNode removes it, undo restores ── |
| 246 | void testInsertAndRemoveNode() { |
nothing calls this directly
no test coverage detected