diff options
Diffstat (limited to 'tests/auto/installer')
-rw-r--r-- | tests/auto/installer/scriptengine/tst_scriptengine.cpp | 1 | ||||
-rw-r--r-- | tests/auto/installer/settings/tst_settings.cpp | 17 |
2 files changed, 13 insertions, 5 deletions
diff --git a/tests/auto/installer/scriptengine/tst_scriptengine.cpp b/tests/auto/installer/scriptengine/tst_scriptengine.cpp index e6dd5db45..0377b8c3a 100644 --- a/tests/auto/installer/scriptengine/tst_scriptengine.cpp +++ b/tests/auto/installer/scriptengine/tst_scriptengine.cpp @@ -198,7 +198,6 @@ private slots: m_component->setValue("Default", "Script"); m_component->setValue(scName, "component.test.name"); - Component *component = new Component(&m_core); component->setValue(scName, "component.test.addOperation"); m_core.appendRootComponent(component); diff --git a/tests/auto/installer/settings/tst_settings.cpp b/tests/auto/installer/settings/tst_settings.cpp index 0b1987b3d..8ff5329a1 100644 --- a/tests/auto/installer/settings/tst_settings.cpp +++ b/tests/auto/installer/settings/tst_settings.cpp @@ -110,12 +110,21 @@ void tst_Settings::loadEmptyConfig() void tst_Settings::loadNotExistingConfig() { + QString configFile = QLatin1String(":/data/inexisting_config.xml"); + QFile file(configFile); + QString errorString; + + if (!file.open(QIODevice::ReadOnly)) { + errorString = file.errorString(); + } + QTest::ignoreMessage(QtDebugMsg, QString::fromLatin1("create Error-Exception: \"Could not open" + " settings file %1 for reading: %2\"") + .arg(configFile).arg(errorString).toLatin1()); try { - Settings::fromFileAndPrefix(":/data/inexisting_config.xml", ":/data"); + Settings::fromFileAndPrefix(configFile, ":/data"); } catch (const Error &error) { - QCOMPARE(error.message(), QLatin1String("Cannot open settings file " - ":/data/inexisting_config.xml for reading: " - "Unknown error")); + QCOMPARE(error.message(), QString::fromLatin1("Could not open settings file " + "%1 for reading: %2").arg(configFile).arg(errorString)); return; } QFAIL("No exception thrown"); |