File indexing completed on 2024-05-12 04:39:18

0001 /*
0002     SPDX-FileCopyrightText: 2014 Milian Wolff <mail@milianw.de>
0003 
0004     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005 */
0006 
0007 #ifndef DUCHAINTEST_H
0008 #define DUCHAINTEST_H
0009 
0010 #include <QObject>
0011 
0012 class TestEnvironmentProvider;
0013 
0014 namespace KDevelop {
0015 class TestProjectController;
0016 }
0017 
0018 class TestDUChain : public QObject
0019 {
0020     Q_OBJECT
0021 public:
0022     ~TestDUChain() override;
0023 
0024 private Q_SLOTS:
0025     void initTestCase();
0026     void cleanupTestCase();
0027 
0028     void init();
0029     void cleanup();
0030 
0031     void testComments();
0032     void testComments_data();
0033     void testElaboratedType();
0034     void testElaboratedType_data();
0035 
0036     void testMacroDefinition();
0037     void testMacroDefinition_data();
0038 
0039     void testInclude();
0040     void testMissingInclude();
0041     void testIncludeLocking();
0042     void testReparse();
0043     void testReparseError();
0044     void testTemplate();
0045     void testNamespace();
0046     void testAutoTypeDeduction();
0047     void testTypeDeductionInTemplateInstantiation();
0048     void testVirtualMemberFunction();
0049     void testBaseClasses();
0050     void testReparseBaseClasses();
0051     void testReparseBaseClassesTemplates();
0052     void testGetInheriters();
0053     void testGetInheriters_data();
0054     void testGlobalFunctionDeclaration();
0055     void testFunctionDefinitionVsDeclaration();
0056     void testEnsureNoDoubleVisit();
0057     void testReparseWithAllDeclarationsContextsAndUses();
0058     void testReparseOnDocumentActivated();
0059     void testParsingEnvironment();
0060     void testSystemIncludes();
0061     void testReparseInclude();
0062     void testReparseChangeEnvironment();
0063     void testMacrosRanges();
0064     void testMacroUses();
0065     void testHeaderParsingOrder1();
0066     void testHeaderParsingOrder2();
0067     void testMacroDependentHeader();
0068     void testNestedImports();
0069     void testEnvironmentWithDifferentOrderOfElements();
0070     void testReparseMacro();
0071     void testMultiLineMacroRanges();
0072     void testNestedMacroRanges();
0073     void testGotoStatement();
0074     void testRangesOfOperatorsInsideMacro();
0075     void testActiveDocumentHasASTAttached();
0076     void testActiveDocumentsGetBestPriority();
0077     void testUsesCreatedForDeclarations();
0078     void testReparseIncludeGuard();
0079     void testIncludeGuardHeaderHeaderOnly();
0080     void testIncludeGuardHeaderHeaderOnly_data();
0081     void testIncludeGuardHeaderWarning();
0082     void testExternC();
0083     void testIncludeExternC();
0084     void testLambda();
0085     void testReparseUnchanged_data();
0086     void testReparseUnchanged();
0087     void testTypeAliasTemplate();
0088     void testDeclarationsInsideMacroExpansion();
0089     void testForwardTemplateTypeParameterContext();
0090     void testTemplateFunctionParameterName();
0091     void testFriendDeclaration();
0092     void testVariadicTemplateArguments();
0093     void testProblemRequestedHere();
0094     void testProblemRequestedHereSameFile();
0095     void testProblemRequestedHereChain();
0096 
0097     void testGccCompatibility_data();
0098     void testGccCompatibility();
0099     void testQtIntegration();
0100     void testHasInclude();
0101 
0102     void testSameFunctionDefinition();
0103     void testSizeAlignOf();
0104     void testSizeAlignOfUpdate();
0105     void testBitWidth();
0106     void testValueDependentBitWidth();
0107     void testBitWidthUpdate();
0108 
0109 private:
0110     QScopedPointer<TestEnvironmentProvider> m_provider;
0111     KDevelop::TestProjectController* m_projectController;
0112 };
0113 
0114 #endif // DUCHAINTEST_H