Improved test TST_QmuParserErrorMsg::TestEErrorCodes().

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-11-15 21:09:52 +02:00
parent d118ccb218
commit 14e3c06833

View File

@ -210,6 +210,8 @@ int TST_QmuParserErrorMsg::LoadTranslation(const QString &checkedLocale)
void TST_QmuParserErrorMsg::CheckStrings(int code, bool tok, bool pos)
{
const QString translated = (*msg)[code];
QCOMPARE(translated.indexOf(QLatin1Literal("$TOK$")) != -1, tok);
QCOMPARE(translated.indexOf(QLatin1Literal("$POS$")) != -1, pos);
const QString message = QString("String: '%1'.").arg(translated);
QVERIFY2((translated.indexOf(QLatin1Literal("$TOK$")) != -1) == tok, qUtf8Printable(message));
QVERIFY2((translated.indexOf(QLatin1Literal("$POS$")) != -1) == pos, qUtf8Printable(message));
}