1 /*
2     SPDX-FileCopyrightText: 2014 Milian Wolff <mail@milianw.de>
3 
4     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
5 */
6 
7 #ifndef DUCHAINTEST_H
8 #define DUCHAINTEST_H
9 
10 #include <QObject>
11 
12 class TestEnvironmentProvider;
13 
14 namespace KDevelop {
15 class TestProjectController;
16 }
17 
18 class TestDUChain : public QObject
19 {
20     Q_OBJECT
21 public:
22     ~TestDUChain() override;
23 
24 private Q_SLOTS:
25     void initTestCase();
26     void cleanupTestCase();
27 
28     void init();
29     void cleanup();
30 
31     void testComments();
32     void testComments_data();
33     void testElaboratedType();
34     void testElaboratedType_data();
35 
36     void testInclude();
37     void testMissingInclude();
38     void testIncludeLocking();
39     void testReparse();
40     void testReparseError();
41     void testTemplate();
42     void testNamespace();
43     void testAutoTypeDeduction();
44     void testTypeDeductionInTemplateInstantiation();
45     void testVirtualMemberFunction();
46     void testBaseClasses();
47     void testReparseBaseClasses();
48     void testReparseBaseClassesTemplates();
49     void testGetInheriters();
50     void testGetInheriters_data();
51     void testGlobalFunctionDeclaration();
52     void testFunctionDefinitionVsDeclaration();
53     void testEnsureNoDoubleVisit();
54     void testReparseWithAllDeclarationsContextsAndUses();
55     void testReparseOnDocumentActivated();
56     void testParsingEnvironment();
57     void testSystemIncludes();
58     void testReparseInclude();
59     void testReparseChangeEnvironment();
60     void testMacrosRanges();
61     void testMacroUses();
62     void testHeaderParsingOrder1();
63     void testHeaderParsingOrder2();
64     void testMacroDependentHeader();
65     void testNestedImports();
66     void testEnvironmentWithDifferentOrderOfElements();
67     void testReparseMacro();
68     void testMultiLineMacroRanges();
69     void testNestedMacroRanges();
70     void testGotoStatement();
71     void testRangesOfOperatorsInsideMacro();
72     void testActiveDocumentHasASTAttached();
73     void testActiveDocumentsGetBestPriority();
74     void testUsesCreatedForDeclarations();
75     void testReparseIncludeGuard();
76     void testIncludeGuardHeaderHeaderOnly();
77     void testIncludeGuardHeaderHeaderOnly_data();
78     void testIncludeGuardHeaderWarning();
79     void testExternC();
80     void testIncludeExternC();
81     void testLambda();
82     void testReparseUnchanged_data();
83     void testReparseUnchanged();
84     void testTypeAliasTemplate();
85     void testDeclarationsInsideMacroExpansion();
86     void testForwardTemplateTypeParameterContext();
87     void testTemplateFunctionParameterName();
88     void testFriendDeclaration();
89     void testVariadicTemplateArguments();
90     void testProblemRequestedHere();
91     void testProblemRequestedHereSameFile();
92     void testProblemRequestedHereChain();
93 
94     void testGccCompatibility();
95     void testQtIntegration();
96     void testHasInclude();
97 
98     void testSameFunctionDefinition();
99     void testSizeAlignOf();
100     void testSizeAlignOfUpdate();
101     void testBitWidth();
102     void testBitWidthUpdate();
103 
104 private:
105     QScopedPointer<TestEnvironmentProvider> m_provider;
106     KDevelop::TestProjectController* m_projectController;
107 };
108 
109 #endif // DUCHAINTEST_H
110