File indexing completed on 2024-04-21 14:59:03
0001 /* 0002 SPDX-FileCopyrightText: 2013 Aurélien Gâteau <agateau@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 #ifndef KTRANSCRIPTTEST_H 0007 #define KTRANSCRIPTTEST_H 0008 0009 #include <QLibrary> 0010 #include <QObject> 0011 0012 class KTranscript; 0013 0014 /** 0015 * @brief Test the KTranscript plugin 0016 * 0017 * Loads the KTranscript plugin and runs tests on its scripting capabilities. 0018 * 0019 * The main difference to the test ktranscriptcleantest is that it does so using 0020 * a single instance of the KTranscript implementation due to the plugin 0021 * using Q_GLOBAL_STATIC 0022 * 0023 * ktranscriptcleantest on the other hand creates and destroys the instance between 0024 * tests. Test that require a "clean slate" can be added there. 0025 */ 0026 class KTranscriptTest : public QObject 0027 { 0028 Q_OBJECT 0029 public: 0030 KTranscriptTest(); 0031 0032 private Q_SLOTS: 0033 void initTestCase(); 0034 void cleanupTestCase(); 0035 0036 void test_data(); 0037 void test(); 0038 0039 private: 0040 QLibrary m_library; 0041 KTranscript *m_transcript; 0042 }; 0043 0044 #endif /* KTRANSCRIPTTEST_H */