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

Method testRemoveAndUndoNode

tests/test_context_menu.cpp:266–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

findNodeFunction · 0.85
removeNodeMethod · 0.45
undoMethod · 0.45

Tested by

no test coverage detected