| 264 | // ── Remove node then undo restores it ── |
| 265 | |
| 266 | void testRemoveAndUndoNode() { |
| 267 | int flagsIdx = findNode("flags"); |
| 268 | QVERIFY(flagsIdx >= 0); |
| 269 | int before = countNodes(); |
| 270 | |
| 271 | m_ctrl->removeNode(flagsIdx); |
| 272 | QApplication::processEvents(); |
| 273 | QCOMPARE(countNodes(), before - 1); |
| 274 | QCOMPARE(findNode("flags"), -1); |
| 275 | |
| 276 | m_doc->undoStack.undo(); |
| 277 | QApplication::processEvents(); |
| 278 | QCOMPARE(countNodes(), before); |
| 279 | QVERIFY(findNode("flags") >= 0); |
| 280 | } |
| 281 | |
| 282 | // ── Multiple duplicates each add exactly one ── |
| 283 |
nothing calls this directly
no test coverage detected