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

Method testMultipleDuplicates

tests/test_context_menu.cpp:284–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282 // ── Multiple duplicates each add exactly one ──
283
284 void testMultipleDuplicates() {
285 int before = countNodes();
286 int healthIdx = findNode("health");
287 QVERIFY(healthIdx >= 0);
288
289 m_ctrl->duplicateNode(healthIdx);
290 QApplication::processEvents();
291 QCOMPARE(countNodes(), before + 1);
292
293 int copyIdx = findNode("health_copy");
294 QVERIFY(copyIdx >= 0);
295
296 m_ctrl->duplicateNode(copyIdx);
297 QApplication::processEvents();
298 QCOMPARE(countNodes(), before + 2);
299
300 int copy2Idx = findNode("health_copy_copy");
301 QVERIFY(copy2Idx >= 0);
302 }
303
304 // ── Duplicate copy has correct parent ──
305

Callers

nothing calls this directly

Calls 2

findNodeFunction · 0.85
duplicateNodeMethod · 0.80

Tested by

no test coverage detected