diff options
Diffstat (limited to 'tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp')
-rw-r--r-- | tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp index b7e85e8f05..ab49dea6d8 100644 --- a/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp +++ b/tests/auto/corelib/io/qresourceengine/tst_qresourceengine.cpp @@ -57,6 +57,7 @@ private slots: void doubleSlashInRoot(); void setLocale(); void lastModified(); + void resourcesInStaticPlugins(); private: const QString m_runtimeResourceRcc; @@ -119,6 +120,7 @@ void tst_QResourceEngine::checkStructure_data() << QLatin1String("searchpath1") << QLatin1String("searchpath2") << QLatin1String("secondary_root") + << QLatin1String("staticplugin") << QLatin1String("test") << QLatin1String("withoutslashes"); @@ -127,7 +129,7 @@ void tst_QResourceEngine::checkStructure_data() #endif #if defined(BUILTIN_TESTDATA) - rootContents.insert(8, QLatin1String("testqrc")); + rootContents.insert(9, QLatin1String("testqrc")); #endif @@ -520,6 +522,16 @@ void tst_QResourceEngine::lastModified() } } +Q_IMPORT_PLUGIN(PluginClass) +void tst_QResourceEngine::resourcesInStaticPlugins() +{ + // We built a separate static plugin and attempted linking against + // it. That should successfully register the resources linked into + // the plugin via moc generated Q_INIT_RESOURCE calls in a + // Q_CONSTRUCTOR_FUNCTION. + QVERIFY(QFile::exists(":/staticplugin/main.cpp")); +} + QTEST_MAIN(tst_QResourceEngine) #include "tst_qresourceengine.moc" |