From a5345946bbe6a5e6d546436566d65c09f0c27dcc Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 3 Nov 2015 22:28:53 +0200 Subject: [PATCH] Show more data about failed test. --HG-- branch : develop --- src/test/ValentinaTest/tst_measurementregexp.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/ValentinaTest/tst_measurementregexp.cpp b/src/test/ValentinaTest/tst_measurementregexp.cpp index fa5622d90..91691d416 100644 --- a/src/test/ValentinaTest/tst_measurementregexp.cpp +++ b/src/test/ValentinaTest/tst_measurementregexp.cpp @@ -526,7 +526,8 @@ void TST_MeasurementRegExp::CheckRegExpNames() const foreach(const QString &str, originalNames) { const QString translated = trMs->MToUser(str); - QCOMPARE(re.match(translated).hasMatch(), true); + const QString message = QString("Original name:'%1', translated name:'%2'").arg(str).arg(translated); + QVERIFY2(re.match(translated).hasMatch(), qUtf8Printable(message)); } } @@ -539,7 +540,8 @@ void TST_MeasurementRegExp::CheckIsNamesUnique() const foreach(const QString &str, originalNames) { const QString translated = trMs->MToUser(str); - QCOMPARE(names.contains(translated), false); + const QString message = QString("Original name:'%1', translated name:'%2'").arg(str).arg(translated); + QVERIFY2(not names.contains(translated), qUtf8Printable(message)); names.insert(translated); } }