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

Method testIncludeGuardHeaderHeaderOnly

plugins/clang/tests/test_duchain.cpp:1763–1775  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1761}
1762
1763void TestDUChain::testIncludeGuardHeaderHeaderOnly()
1764{
1765 QFETCH(QString, code);
1766
1767 // test that we do NOT get a warning for single standalone header file with include guards
1768 TestFile header(code, QStringLiteral("h"));
1769
1770 QVERIFY(header.parseAndWait(TopDUContext::AllDeclarationsContextsAndUses | TopDUContext::AST));
1771 {
1772 DUChainReadLocker lock;
1773 QCOMPARE(header.topContext()->problems().size(), 0);
1774 }
1775}
1776
1777void TestDUChain::testIncludeGuardHeaderHeaderOnly_data()
1778{

Callers

nothing calls this directly

Calls 4

parseAndWaitMethod · 0.80
sizeMethod · 0.45
problemsMethod · 0.45
topContextMethod · 0.45

Tested by

no test coverage detected