Try to check all files.
--HG-- branch : develop
This commit is contained in:
parent
30cfa143fe
commit
2d4086206c
|
@ -67,7 +67,7 @@ void TST_MeasurementRegExp::TestOriginalMeasurementNamesRegExp()
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
// cppcheck-suppress unusedFunction
|
// cppcheck-suppress unusedFunction
|
||||||
void TST_MeasurementRegExp::TestMeasurementRegExp()
|
void TST_MeasurementRegExp::TestMeasurementRegExp_data()
|
||||||
{
|
{
|
||||||
const int systemCounts = 55;
|
const int systemCounts = 55;
|
||||||
const QStringList locales = SupportedLocales();
|
const QStringList locales = SupportedLocales();
|
||||||
|
@ -81,11 +81,29 @@ void TST_MeasurementRegExp::TestMeasurementRegExp()
|
||||||
QVERIFY2(combinations == fileNames.size(), "Unexpected count of files.");
|
QVERIFY2(combinations == fileNames.size(), "Unexpected count of files.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QTest::addColumn<QString>("system");
|
||||||
|
QTest::addColumn<QString>("locale");
|
||||||
|
|
||||||
for(int s = 0; s < systemCounts; ++s)
|
for(int s = 0; s < systemCounts; ++s)
|
||||||
{
|
{
|
||||||
for(int l = 0, sz = locales.size(); l < sz; ++l)
|
for(int l = 0, sz = locales.size(); l < sz; ++l)
|
||||||
{
|
{
|
||||||
const int res = LoadTranslation(QString("p%1").arg(s), locales.at(l));
|
const QString system = QString("p%1").arg(s);
|
||||||
|
const QString locale = locales.at(l);
|
||||||
|
const QString tag = QString("Check translation measurements_%1_%2.qm").arg(system).arg(locale);
|
||||||
|
QTest::newRow(qUtf8Printable(tag)) << system << locale;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
|
void TST_MeasurementRegExp::TestMeasurementRegExp()
|
||||||
|
{
|
||||||
|
QFETCH(QString, system);
|
||||||
|
QFETCH(QString, locale);
|
||||||
|
|
||||||
|
const int res = LoadTranslation(system, locale);
|
||||||
|
|
||||||
switch(res)
|
switch(res)
|
||||||
{
|
{
|
||||||
|
@ -93,10 +111,10 @@ void TST_MeasurementRegExp::TestMeasurementRegExp()
|
||||||
case ErrorSize:
|
case ErrorSize:
|
||||||
case ErrorLoad:
|
case ErrorLoad:
|
||||||
{
|
{
|
||||||
const QString message = QString("Failed to check translation for system = p%1 and locale = %2")
|
const QString message = QString("Failed to check translation for system = %1 and locale = %2")
|
||||||
.arg(s)
|
.arg(system)
|
||||||
.arg(locales.at(l));
|
.arg(locale);
|
||||||
QFAIL(qUtf8Printable(message));
|
QSKIP(qUtf8Printable(message));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case NoError:
|
case NoError:
|
||||||
|
@ -109,9 +127,9 @@ void TST_MeasurementRegExp::TestMeasurementRegExp()
|
||||||
|
|
||||||
if (result == false)
|
if (result == false)
|
||||||
{
|
{
|
||||||
const QString message = QString("Can't remove translation for system = p%1 and locale = %2")
|
const QString message = QString("Can't remove translation for system = %1 and locale = %2")
|
||||||
.arg(s)
|
.arg(system)
|
||||||
.arg(locales.at(l));
|
.arg(locale);
|
||||||
QWARN(qUtf8Printable(message));
|
QWARN(qUtf8Printable(message));
|
||||||
}
|
}
|
||||||
delete pmsTranslator;
|
delete pmsTranslator;
|
||||||
|
@ -120,8 +138,6 @@ void TST_MeasurementRegExp::TestMeasurementRegExp()
|
||||||
default:
|
default:
|
||||||
QWARN("Unexpected state");
|
QWARN("Unexpected state");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -43,6 +43,7 @@ public:
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void TestOriginalMeasurementNamesRegExp();
|
void TestOriginalMeasurementNamesRegExp();
|
||||||
|
void TestMeasurementRegExp_data();
|
||||||
void TestMeasurementRegExp();
|
void TestMeasurementRegExp();
|
||||||
void TestCorrectOrderMeasurement_data();
|
void TestCorrectOrderMeasurement_data();
|
||||||
void TestCorrectOrderMeasurement();
|
void TestCorrectOrderMeasurement();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user