MCPcopy Create free account
hub / github.com/KDE/kdevelop / testRemoveDocumentFile

Method testRemoveDocumentFile

kdevplatform/debugger/tests/test_breakpointmodel.cpp:562–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560}
561
562void TestBreakpointModel::testRemoveDocumentFile()
563{
564 const auto [url, doc, b1, b2] = setupEditCheckAndSavePrimaryDocumentAndBreakpoints();
565 RETURN_IF_TEST_FAILED();
566
567 // Remove the file on disk.
568 QVERIFY(QFile::remove(m_tempDir->filePath(primaryTestFileName)));
569
570 // Discard the document.
571 QVERIFY(doc->close(IDocument::Discard));
572
573 // Wait needed to process events.
574 QTest::qWait(1);
575
576 // The breakpoints must still exist and remain unchanged.
577 verifyTwoModelBreakpoints(b1, b2);
578 RETURN_IF_TEST_FAILED();
579
580 // The breakpoint locations must be unaffected.
581 VERIFY_UNTRACKED_BREAKPOINT(b1, 23, );
582 VERIFY_UNTRACKED_BREAKPOINT(b2, 24, );
583}
584
585void TestBreakpointModel::testDocumentClear()
586{

Callers

nothing calls this directly

Calls 2

filePathMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected