Refactoring tests.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-12-15 16:38:37 +02:00
parent 717772c339
commit 2409b1cc8b
2 changed files with 11 additions and 8 deletions

View File

@ -85,7 +85,7 @@ void TST_MeasurementRegExp::TestMeasurementRegExp()
case ErrorSize: case ErrorSize:
case ErrorLoad: case ErrorLoad:
{ {
const QString message = QString("Failed to check translation for system = %1 and locale = %2") const QString message = QString("Can't to check translation for system = %1 and locale = %2")
.arg(system) .arg(system)
.arg(locale); .arg(locale);
QSKIP(qUtf8Printable(message)); QSKIP(qUtf8Printable(message));
@ -397,7 +397,7 @@ void TST_MeasurementRegExp::TestAllTranslatedMeasurementsIsUnique()
case ErrorSize: case ErrorSize:
case ErrorLoad: case ErrorLoad:
{ {
const QString message = QString("Failed to check translation for system = %1 and locale = %2") const QString message = QString("Can't to check translation for system = %1 and locale = %2")
.arg(system) .arg(system)
.arg(locale); .arg(locale);
QSKIP(qUtf8Printable(message)); QSKIP(qUtf8Printable(message));

View File

@ -217,8 +217,9 @@ void TST_TSTranslation::CheckPlaceMarkerExist()
++sourceMarkCount; ++sourceMarkCount;
if (sourceMarkCount != i) if (sourceMarkCount != i)
{ {
const QString message = QString("In source string '%1' was missed place marker '%2'.") const QString message = QString("In source string '%1' was missed place marker ")
.arg(source).arg(QLatin1Literal("%") + QString().setNum(sourceMarkCount)); .arg(source) + QLatin1Literal("'%") + QString().setNum(sourceMarkCount) +
QLatin1Literal("'.");
QFAIL(qUtf8Printable(message)); QFAIL(qUtf8Printable(message));
} }
} }
@ -229,8 +230,9 @@ void TST_TSTranslation::CheckPlaceMarkerExist()
++translationMarkCount; ++translationMarkCount;
if (translationMarkCount != i) if (translationMarkCount != i)
{ {
const QString message = QString("In translation string '%1' was missed place marker '%2'.") const QString message = QString("In translation string '%1' was missed place marker ")
.arg(translation).arg(QLatin1Literal("%") + QString().setNum(translationMarkCount)); .arg(translation) + QLatin1Literal("'%") + QString().setNum(translationMarkCount) +
QLatin1Literal("'.");
QFAIL(qUtf8Printable(message)); QFAIL(qUtf8Printable(message));
} }
} }
@ -238,8 +240,9 @@ void TST_TSTranslation::CheckPlaceMarkerExist()
if (sourceMark != translationMark) if (sourceMark != translationMark)
{ {
const QString message = const QString message =
QString("Compare to source string in translation string '%1' was missed place marker '%2'.") QString("Compare to source string in the translation string '%1' was missed place marker ")
.arg(translation).arg(marker); .arg(translation) + QLatin1Literal("'%") + QString().setNum(sourceMarkCount) +
QLatin1Literal("'.");
QFAIL(qUtf8Printable(message)); QFAIL(qUtf8Printable(message));
} }
} }