summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-06-24 12:32:04 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-06-24 11:08:24 +0000
commit5d53c5a4ba362c6281da869c0a04a6c47cb54d52 (patch)
tree8ce19a0e2884591240d8b4bcb98682fb944bab5c /tests
parent1d0d566f15487d62db1632b3f663856e25c79f6c (diff)
Fix error strings in autotests
Fix autotests that broke with commit 1e589e37a991b. Change-Id: I2c0ed437de17fef856706fb3e422f3466c373c37 Reviewed-by: Niels Weber <niels.weber@theqtcompany.com> Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/installer/extractarchiveoperationtest/tst_extractarchiveoperationtest.cpp4
-rw-r--r--tests/auto/installer/lib7zfacade/tst_lib7zfacade.cpp2
-rw-r--r--tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp2
-rw-r--r--tests/auto/installer/scriptengine/tst_scriptengine.cpp4
-rw-r--r--tests/auto/installer/settings/tst_settings.cpp8
-rw-r--r--tests/auto/installer/settingsoperation/tst_settingsoperation.cpp8
6 files changed, 14 insertions, 14 deletions
diff --git a/tests/auto/installer/extractarchiveoperationtest/tst_extractarchiveoperationtest.cpp b/tests/auto/installer/extractarchiveoperationtest/tst_extractarchiveoperationtest.cpp
index f4188a979..c344fb8e1 100644
--- a/tests/auto/installer/extractarchiveoperationtest/tst_extractarchiveoperationtest.cpp
+++ b/tests/auto/installer/extractarchiveoperationtest/tst_extractarchiveoperationtest.cpp
@@ -86,8 +86,8 @@ private slots:
QVERIFY(op.undoOperation());
QCOMPARE(UpdateOperation::Error(op.error()), UpdateOperation::UserDefinedError);
- QCOMPARE(op.errorString(), QString("Error while extracting ':///data/invalid.7z': Could "
- "not open archive ':///data/invalid.7z'."));
+ QCOMPARE(op.errorString(), QString("Error while extracting archive \":///data/invalid.7z\": "
+ "Cannot open archive \":///data/invalid.7z\"."));
}
};
diff --git a/tests/auto/installer/lib7zfacade/tst_lib7zfacade.cpp b/tests/auto/installer/lib7zfacade/tst_lib7zfacade.cpp
index 654320537..7dde7e555 100644
--- a/tests/auto/installer/lib7zfacade/tst_lib7zfacade.cpp
+++ b/tests/auto/installer/lib7zfacade/tst_lib7zfacade.cpp
@@ -100,7 +100,7 @@ private slots:
QVERIFY(file.open(QIODevice::ReadOnly));
QVector<Lib7z::File> files = Lib7z::listArchive(&file);
} catch (const Lib7z::SevenZipException& e) {
- QCOMPARE(e.message(), QString("Cannot open archive ':///data/invalid.7z'."));
+ QCOMPARE(e.message(), QString("Cannot open archive \":///data/invalid.7z\"."));
} catch (...) {
QFAIL("Unexpected error during list archive.");
}
diff --git a/tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp b/tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp
index aeb75f7b1..3267ec00e 100644
--- a/tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp
+++ b/tests/auto/installer/messageboxhandler/tst_messageboxhandler.cpp
@@ -65,7 +65,7 @@ private slots:
void testDefaultAction()
{
- const char ignoreMessage[] = "\"created critical message box TestError: 'A test error', "
+ const char ignoreMessage[] = "\"Created critical message box TestError: \"A test error\", "
"This is a test error message.\" ";
srand(time(0)); /* initialize random seed: */
diff --git a/tests/auto/installer/scriptengine/tst_scriptengine.cpp b/tests/auto/installer/scriptengine/tst_scriptengine.cpp
index 1d9144105..b208ff870 100644
--- a/tests/auto/installer/scriptengine/tst_scriptengine.cpp
+++ b/tests/auto/installer/scriptengine/tst_scriptengine.cpp
@@ -366,8 +366,8 @@ private slots:
testComponent->loadComponentScript(":///data/component2.qs");
} catch (const Error &error) {
const QString debugMessage(
- "create Error-Exception: \"Exception while loading the component script '"
- ":///data/component2.qs'. (ReferenceError: broken is not defined)\"");
+ "create Error-Exception: \"Exception while loading the component script \""
+ ":///data/component2.qs\": ReferenceError: broken is not defined\"");
QVERIFY2(debugMessage.contains(error.message()), "(ReferenceError: broken is not defined)");
}
}
diff --git a/tests/auto/installer/settings/tst_settings.cpp b/tests/auto/installer/settings/tst_settings.cpp
index dca8838c5..49385d4ee 100644
--- a/tests/auto/installer/settings/tst_settings.cpp
+++ b/tests/auto/installer/settings/tst_settings.cpp
@@ -136,7 +136,7 @@ void tst_Settings::loadUnknownElementConfigInStrictParseMode()
Settings::fromFileAndPrefix(":/data/unknown_element_config.xml", ":/data");
} catch (const Error &error) {
QCOMPARE(error.message(), QLatin1String("Error in :/data/unknown_element_config.xml, line 5, "
- "column 13: Unexpected element 'unknown'."));
+ "column 13: Unexpected element \"unknown\"."));
return;
}
QFAIL("No exception thrown");
@@ -145,7 +145,7 @@ void tst_Settings::loadUnknownElementConfigInStrictParseMode()
void tst_Settings::loadUnknownElementConfigInRelaxedParseMode()
{
QTest::ignoreMessage(QtWarningMsg, "\"Ignoring following settings reader error in "
- ":/data/unknown_element_config.xml, line 5, column 13: Unexpected element 'unknown'.\" ");
+ ":/data/unknown_element_config.xml, line 5, column 13: Unexpected element \"unknown\".\" ");
try {
Settings settings = Settings::fromFileAndPrefix(":/data/unknown_element_config.xml", ":/data",
Settings::RelaxedParseMode);
@@ -173,7 +173,7 @@ void tst_Settings::loadUnexpectedAttributeConfig()
Settings::fromFileAndPrefix(":///data/unexpectedattribute_config.xml", ":///data");
} catch (const Error &error) {
QCOMPARE(error.message(), QLatin1String("Error in :///data/unexpectedattribute_config.xml,"
- " line 6, column 27: Unexpected attribute for element 'Argument'."));
+ " line 6, column 27: Unexpected attribute for element \"Argument\"."));
return;
}
QFAIL("No exception thrown");
@@ -187,7 +187,7 @@ void tst_Settings::loadUnexpectedTagConfig()
Settings::fromFileAndPrefix(":///data/unexpectedtag_config.xml", ":///data");
} catch (const Error &error) {
QCOMPARE(error.message(), QLatin1String("Error in :///data/unexpectedtag_config.xml,"
- " line 6, column 12: Unexpected element 'Foo'."));
+ " line 6, column 12: Unexpected element \"Foo\"."));
return;
}
QFAIL("No exception thrown");
diff --git a/tests/auto/installer/settingsoperation/tst_settingsoperation.cpp b/tests/auto/installer/settingsoperation/tst_settingsoperation.cpp
index 319d2123d..774226dca 100644
--- a/tests/auto/installer/settingsoperation/tst_settingsoperation.cpp
+++ b/tests/auto/installer/settingsoperation/tst_settingsoperation.cpp
@@ -75,8 +75,8 @@ private slots:
QCOMPARE(UpdateOperation::Error(noArgumentsOperation.error()),
UpdateOperation::InvalidArguments);
- QString compareString("Missing argument(s) 'path; method; key; value' calling 'Settings' "
- "with arguments ''.");
+ QString compareString("Missing argument(s) \"path; method; key; value\" calling Settings "
+ "with arguments \"\".");
QCOMPARE(noArgumentsOperation.errorString(), compareString);
// same for undo
@@ -93,8 +93,8 @@ private slots:
QCOMPARE(UpdateOperation::Error(wrongMethodArgumentOperation.error()),
UpdateOperation::InvalidArguments);
- compareString = "Current method argument calling 'Settings' with arguments 'path=first; "
- "method=second; key=third; value=fourth' is not supported. Please use set, remove, "
+ compareString = "Current method argument calling \"Settings\" with arguments \"path=first; "
+ "method=second; key=third; value=fourth\" is not supported. Please use set, remove, "
"add_array_value or remove_array_value.";
QCOMPARE(wrongMethodArgumentOperation.errorString(), compareString);