diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-01-13 15:15:24 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-13 15:16:52 +0100 |
commit | 2ba2320f19b44888d3839def0ec2504918e37c48 (patch) | |
tree | 9fb7620459fd906d4f07941798d0f2feaf268f56 | |
parent | 560e814f7e51a158ee6668ae3e9ceecf8a0d6834 (diff) | |
download | qtscript-2ba2320f19b44888d3839def0ec2504918e37c48.tar.gz |
Use QFINDTESTDATA in tst_qscriptextensionplugin.
Find plugins on Windows as well.
Change-Id: I013cc74299a6d476d8d5f9554cdee71d4092b4ac
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
-rw-r--r-- | tests/auto/qscriptextensionplugin/tst_qscriptextensionplugin.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/auto/qscriptextensionplugin/tst_qscriptextensionplugin.cpp b/tests/auto/qscriptextensionplugin/tst_qscriptextensionplugin.cpp index b16b81e..7aa3ed3 100644 --- a/tests/auto/qscriptextensionplugin/tst_qscriptextensionplugin.cpp +++ b/tests/auto/qscriptextensionplugin/tst_qscriptextensionplugin.cpp @@ -50,25 +50,31 @@ class tst_QScriptExtensionPlugin : public QObject public: tst_QScriptExtensionPlugin(); - virtual ~tst_QScriptExtensionPlugin(); private slots: + void initTestCase(); void importSimplePlugin(); void importStaticPlugin(); + +private: + const QString m_pluginsDirectory; + }; -tst_QScriptExtensionPlugin::tst_QScriptExtensionPlugin() +tst_QScriptExtensionPlugin::tst_QScriptExtensionPlugin() : + m_pluginsDirectory(QFINDTESTDATA("plugins")) { } -tst_QScriptExtensionPlugin::~tst_QScriptExtensionPlugin() +void tst_QScriptExtensionPlugin::initTestCase() { + QVERIFY2(!m_pluginsDirectory.isEmpty(), "'plugins' directory not found"); } void tst_QScriptExtensionPlugin::importSimplePlugin() { QScriptEngine eng; - QCoreApplication::addLibraryPath("plugins"); + QCoreApplication::addLibraryPath(m_pluginsDirectory); QVERIFY(eng.importedExtensions().isEmpty()); |