From 5ec241ee0ed0bfb776c9258d4b4d47ac1b127a3a Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Fri, 17 Jun 2011 13:18:42 +0300 Subject: [PATCH] GUITESTS: Few compares in tests were wrong way around. --- gui/test/projectfile/testprojectfile.cpp | 2 +- gui/test/translationhandler/testtranslationhandler.cpp | 4 ++-- gui/test/xmlreportv1/testxmlreportv1.cpp | 2 +- gui/test/xmlreportv2/testxmlreportv2.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gui/test/projectfile/testprojectfile.cpp b/gui/test/projectfile/testprojectfile.cpp index 888798646..4c56c1bed 100644 --- a/gui/test/projectfile/testprojectfile.cpp +++ b/gui/test/projectfile/testprojectfile.cpp @@ -25,7 +25,7 @@ void TestProjectFile::loadInexisting() { const QString filepath(QString(SRCDIR) + "/../projectfiles/foo.cppcheck"); ProjectFile pfile(filepath); - QCOMPARE(false, pfile.Read()); + QCOMPARE(pfile.Read(), false); } void TestProjectFile::loadSimple() diff --git a/gui/test/translationhandler/testtranslationhandler.cpp b/gui/test/translationhandler/testtranslationhandler.cpp index 1b663e45b..06a527b23 100644 --- a/gui/test/translationhandler/testtranslationhandler.cpp +++ b/gui/test/translationhandler/testtranslationhandler.cpp @@ -24,8 +24,8 @@ void TestTranslationHandler::construct() { TranslationHandler handler; - QCOMPARE(11, handler.GetNames().size()); - QCOMPARE(QString("en"), handler.GetCurrentLanguage()); + QCOMPARE(handler.GetNames().size(), 11); + QCOMPARE(handler.GetCurrentLanguage(), QString("en")); } QTEST_MAIN(TestTranslationHandler) diff --git a/gui/test/xmlreportv1/testxmlreportv1.cpp b/gui/test/xmlreportv1/testxmlreportv1.cpp index 91ddd9799..d02b32b90 100644 --- a/gui/test/xmlreportv1/testxmlreportv1.cpp +++ b/gui/test/xmlreportv1/testxmlreportv1.cpp @@ -29,7 +29,7 @@ void TestXmlReportV1::readXml() XmlReportV1 report(filepath); QVERIFY(report.Open()); QList errors = report.Read(); - QCOMPARE(6, errors.size()); + QCOMPARE(errors.size(), 6); ErrorItem item = errors[0]; QCOMPARE(item.file, QString("test.cxx")); diff --git a/gui/test/xmlreportv2/testxmlreportv2.cpp b/gui/test/xmlreportv2/testxmlreportv2.cpp index b564c46e0..560689a88 100644 --- a/gui/test/xmlreportv2/testxmlreportv2.cpp +++ b/gui/test/xmlreportv2/testxmlreportv2.cpp @@ -29,7 +29,7 @@ void TestXmlReportV2::readXml() XmlReportV2 report(filepath); QVERIFY(report.Open()); QList errors = report.Read(); - QCOMPARE(6, errors.size()); + QCOMPARE(errors.size(), 6); ErrorItem item = errors[0]; QCOMPARE(item.file, QString("test.cxx"));