Warning, file /kdevelop/kdev-python/duchain/tests/pyduchaintest.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 SPDX-FileCopyrightText: 2010 Miquel Canes Gonzalez <miquelcanes@gmail.com> 0003 SPDX-FileCopyrightText: 2011-2012 Sven Brauch <svenbrauch@googlemail.com> 0004 0005 SPDX-License-Identifier: MIT 0006 */ 0007 0008 #ifndef PYDUCHAINTEST_H 0009 #define PYDUCHAINTEST_H 0010 0011 #include <QObject> 0012 #include <QTemporaryDir> 0013 #include "ast.h" 0014 #include <serialization/indexedstring.h> 0015 #include <language/duchain/topducontext.h> 0016 #include <tests/testfile.h> 0017 0018 namespace KDevelop { 0019 class TopDUContext; 0020 class ReferencedTopDUContext; 0021 } 0022 0023 using namespace KDevelop; 0024 0025 class PyDUChainTest : public QObject 0026 { 0027 Q_OBJECT 0028 public: 0029 explicit PyDUChainTest(QObject* parent = nullptr); 0030 void initShell(); 0031 ~PyDUChainTest() override; 0032 0033 KDevelop::ReferencedTopDUContext parse(const QString& code); 0034 0035 Python::CodeAst::Ptr m_ast; 0036 0037 private slots: 0038 void init(); 0039 void testSimple(); 0040 void testSimple_data(); 0041 void testRanges(); 0042 void testRanges_data(); 0043 void testTypes(); 0044 void testTypes_data(); 0045 void testImportDeclarations(); 0046 void testImportDeclarations_data(); 0047 void testImportFiles(); 0048 void testCrashes(); 0049 void testCrashes_data(); 0050 void testFlickering(); 0051 void testFlickering_data(); 0052 void testFunctionArgs(); 0053 void testAutocompletionFlickering(); 0054 void testContainerTypes(); 0055 void testContainerTypes_data(); 0056 void testInheritance(); 0057 void testInheritance_data(); 0058 void testClassVariables(); 0059 void testWarnNewNotCls(); 0060 void testWarnNewNotCls_data(); 0061 void testBinaryOperatorsUnsure(); 0062 void testBinaryOperatorsUnsure_data(); 0063 void testClassContextRanges(); 0064 void testVarKWArgs(); 0065 void testMultiFromImport(); 0066 void testMultiFromImport_data(); 0067 void testRelativeImport(); 0068 void testRelativeImport_data(); 0069 void testCannotOverwriteBuiltins(); 0070 void testFunctionHints(); 0071 void testFunctionHints_data(); 0072 void testCannotOverwriteBuiltins_data(); 0073 void testOperators(); 0074 void testOperators_data(); 0075 void testVariableCreation(); 0076 void testVariableCreation_data(); 0077 void testProblemCount(); 0078 void testProblemCount_data(); 0079 void testHintedTypes(); 0080 void testHintedTypes_data(); 0081 void testCleanupMultiplePasses(); 0082 void testComments(); 0083 void testComments_data(); 0084 void testManyDeclarations(); 0085 0086 0087 private: 0088 QList<KDevelop::TestFile*> createdFiles; 0089 QTemporaryDir testDirOwner; 0090 QDir testDir; 0091 QDir assetsDir; 0092 QString lastTest; 0093 0094 QList<QString> FindPyFiles(QDir& root); 0095 }; 0096 0097 #endif // PYDUCHAINTEST_H