| 801 | } |
| 802 | |
| 803 | void TestDUChain::testGlobalFunctionDeclaration() |
| 804 | { |
| 805 | TestFile file(QStringLiteral("void foo(int arg1, char arg2);\n"), QStringLiteral("cpp")); |
| 806 | file.parse(TopDUContext::AllDeclarationsContextsAndUses); |
| 807 | file.waitForParsed(); |
| 808 | |
| 809 | DUChainReadLocker lock; |
| 810 | QVERIFY(file.topContext()); |
| 811 | QCOMPARE(file.topContext()->localDeclarations().size(), 1); |
| 812 | QCOMPARE(file.topContext()->childContexts().size(), 1); |
| 813 | QVERIFY(!file.topContext()->childContexts().first()->inSymbolTable()); |
| 814 | } |
| 815 | |
| 816 | void TestDUChain::testFunctionDefinitionVsDeclaration() |
| 817 | { |
nothing calls this directly
no test coverage detected