File indexing completed on 2024-05-19 04:36:55
0001 /* 0002 SPDX-FileCopyrightText: 2008 Niko Sams <niko.sams@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.0-only 0005 */ 0006 0007 #ifndef TESTCOMPLETION_H 0008 #define TESTCOMPLETION_H 0009 0010 #include <language/codecompletion/codecompletionitem.h> 0011 #include <language/duchain/classdeclaration.h> 0012 0013 #include "../../duchain/tests/duchaintestbase.h" 0014 0015 namespace Php 0016 { 0017 0018 class TestCompletion : public DUChainTestBase 0019 { 0020 Q_OBJECT 0021 0022 public: 0023 TestCompletion(); 0024 0025 private: 0026 void dumpCompletionItems(QList<KDevelop::CompletionTreeItemPointer> items); 0027 void verifyExtendsOrImplements(const QString &code, const QString &actionStr, 0028 KDevelop::ClassDeclarationData::ClassType, 0029 const KDevelop::CursorInRevision& cursor, 0030 QStringList forbiddenIdentifiers); 0031 0032 private slots: 0033 void publicObjectCompletion(); 0034 void publicStaticObjectCompletion(); 0035 void protectedObjectCompletion(); 0036 void protectedStaticObjectCompletion(); 0037 void privateObjectCompletion(); 0038 void privateStaticObjectCompletion(); 0039 void methodCall(); 0040 void functionCall(); 0041 void nestedFunctionCall_data(); 0042 void nestedFunctionCall(); 0043 void newObjectFromOtherFile(); 0044 void constantFromOtherFile(); 0045 void baseClass(); 0046 void extendsFromOtherFile(); 0047 void globalClassFromOtherFile(); 0048 void codeModel(); 0049 void projectFileClass(); 0050 void variable(); 0051 void nameNormalVariable(); 0052 void nameClassMember(); 0053 void exceptions(); 0054 void exceptionOtherFile(); 0055 void abstractMethods(); 0056 void interfaceMethods(); 0057 void interfaceMethods2(); 0058 void overrideMethods(); 0059 void overrideVars(); 0060 void implementMethods(); 0061 void inArray(); 0062 void newExtends(); 0063 void updateExtends(); 0064 void newImplements(); 0065 void updateImplements(); 0066 void avoidCircularInheritance(); 0067 void unsureType(); 0068 void completionAfterComments(); 0069 void completionInComments(); 0070 void phpStartTag(); 0071 void outsidePhpContext(); 0072 void nonGlobalInFunction(); 0073 void fileCompletion(); 0074 void instanceof(); 0075 void afterFunctionArg(); 0076 void functionBeforeDeclaration(); 0077 void classBeforeDeclaration(); 0078 void constantBeforeDeclaration(); 0079 void variableBeforeDeclaration(); 0080 void functionArguments(); 0081 void referencedClass(); 0082 void ctorCall(); 0083 void chainedCalling(); 0084 void funcCallInConditional(); 0085 void namespaces(); 0086 void inNamespace(); 0087 void closures(); 0088 }; 0089 0090 } 0091 0092 #endif // TESTCOMPLETION_H