summaryrefslogtreecommitdiff
path: root/tests/auto/cplusplus/codegen/tst_codegen.cpp
diff options
context:
space:
mode:
authorBill King <bill.king@nokia.com>2010-10-21 14:52:56 +1000
committerBill King <bill.king@nokia.com>2010-10-21 14:52:56 +1000
commit2ede8e3c16ae33b3c57ef1cf1e00a917d687bb68 (patch)
treefc7113ab53e5690154d8deb04e3cb3163ffa5c46 /tests/auto/cplusplus/codegen/tst_codegen.cpp
parent524a9ac4a8f9cbe5d961638c186e48fdb9502aed (diff)
downloadqt-creator-2ede8e3c16ae33b3c57ef1cf1e00a917d687bb68.tar.gz
tests: get tst_codegen running again, if not passing yet.
Diffstat (limited to 'tests/auto/cplusplus/codegen/tst_codegen.cpp')
-rw-r--r--tests/auto/cplusplus/codegen/tst_codegen.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/auto/cplusplus/codegen/tst_codegen.cpp b/tests/auto/cplusplus/codegen/tst_codegen.cpp
index 43cbbb6ffb..801fc6ebcd 100644
--- a/tests/auto/cplusplus/codegen/tst_codegen.cpp
+++ b/tests/auto/cplusplus/codegen/tst_codegen.cpp
@@ -9,6 +9,8 @@
#include <Symbols.h>
#include <cpptools/insertionpointlocator.h>
#include <cpptools/cpprefactoringchanges.h>
+#include <cpptools/cpptoolsplugin.h>
+#include <extensionsystem/pluginmanager.h>
#include <QtTest>
#include <QtDebug>
@@ -28,6 +30,8 @@ class tst_Codegen: public QObject
Q_OBJECT
private slots:
+ void initTestCase();
+ void cleanupTestCase();
void public_in_empty_class();
void public_in_nonempty_class();
void public_before_protected();
@@ -35,8 +39,23 @@ private slots:
void protected_in_nonempty_class();
void protected_betwee_public_and_private();
void qtdesigner_integration();
+private:
+ ExtensionSystem::PluginManager *pluginManager;
};
+void tst_Codegen::initTestCase()
+{
+ pluginManager = new ExtensionSystem::PluginManager;
+ pluginManager->setFileExtension(QLatin1String("pluginspec"));
+ pluginManager->setPluginPaths(QStringList() << QLatin1String(Q_PLUGIN_PATH));
+ pluginManager->loadPlugins();
+}
+
+void tst_Codegen::cleanupTestCase()
+{
+ pluginManager->shutdown();
+ delete pluginManager;
+}
/*!
Should insert at line 3, column 1, with "public:\n" as prefix and without suffix.
*/
@@ -340,5 +359,5 @@ void tst_Codegen::qtdesigner_integration()
QCOMPARE(loc.column(), 1U);
}
-QTEST_APPLESS_MAIN(tst_Codegen)
+QTEST_MAIN(tst_Codegen)
#include "tst_codegen.moc"