File indexing completed on 2024-04-28 04:37:27
0001 /* 0002 SPDX-FileCopyrightText: 2012 Miha Čančula <miha@noughmad.eu> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef KDEVPLATFORM_TESTCONTROLLER_H 0008 #define KDEVPLATFORM_TESTCONTROLLER_H 0009 0010 #include "interfaces/itestcontroller.h" 0011 0012 #include "shellexport.h" 0013 0014 namespace KDevelop { 0015 class TestControllerPrivate; 0016 0017 class KDEVPLATFORMSHELL_EXPORT TestController : public KDevelop::ITestController 0018 { 0019 Q_OBJECT 0020 0021 public: 0022 explicit TestController(QObject *parent); 0023 ~TestController() override; 0024 0025 void initialize(); 0026 void cleanup(); 0027 0028 void removeTestSuite(KDevelop::ITestSuite* suite) override; 0029 void addTestSuite(KDevelop::ITestSuite* suite) override; 0030 0031 QList< KDevelop::ITestSuite* > testSuites() const override; 0032 KDevelop::ITestSuite* findTestSuite(KDevelop::IProject* project, const QString& name) const override; 0033 QList< KDevelop::ITestSuite* > testSuitesForProject(KDevelop::IProject* project) const override; 0034 0035 void notifyTestRunFinished(KDevelop::ITestSuite* suite, const KDevelop::TestResult& result) override; 0036 void notifyTestRunStarted(KDevelop::ITestSuite* suite, const QStringList& test_cases) override; 0037 0038 private: 0039 const QScopedPointer<class TestControllerPrivate> d_ptr; 0040 Q_DECLARE_PRIVATE(TestController) 0041 }; 0042 0043 } 0044 0045 #endif // KDEVPLATFORM_TESTCONTROLLER_H