diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-31 13:20:41 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-01 09:14:25 +0200 |
commit | 23b08449736ba825a9c582ba18b7a5fdba178e47 (patch) | |
tree | 8513c824f1964f84f957a41658f6d173a008c469 /sd | |
parent | 8e63d451b2aeb646ece98c4e219f92957f4482bd (diff) |
loplugin: look for CPPUNIT_ASSERT_EQUALS with params swapped
idea originally from either tml or moggi, can't remember which
Change-Id: Id78d75035036d3aa1666e33469c6eeb38f9e624d
Reviewed-on: https://gerrit.libreoffice.org/55126
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/export-tests-ooxml1.cxx | 4 | ||||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 10 | ||||
-rw-r--r-- | sd/qa/unit/tiledrendering/tiledrendering.cxx | 10 |
3 files changed, 12 insertions, 12 deletions
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index 86aa3707bf25..db58aaf77e34 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -296,7 +296,7 @@ void SdOOXMLExportTest1::testN828390_5() const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject(); const SvxNumBulletItem *pNumFmt = aEdit.GetPool()->GetItem2(EE_PARA_NUMBULLET, 5); CPPUNIT_ASSERT( pNumFmt ); - CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's relative size is wrong!", pNumFmt->GetNumRule()->GetLevel(1).GetBulletRelSize(), sal_uInt16(75) ); // != 25 + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's relative size is wrong!", sal_uInt16(75), pNumFmt->GetNumRule()->GetLevel(1).GetBulletRelSize() ); // != 25 } xDocShRef->DoClose(); @@ -538,7 +538,7 @@ void SdOOXMLExportTest1::testBulletStartNumber() const EditTextObject& aEdit = pTxtObj->GetOutlinerParaObject()->GetTextObject(); const SvxNumBulletItem *pNumFmt = aEdit.GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET); CPPUNIT_ASSERT(pNumFmt); - CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's start number is wrong!", sal_Int16(pNumFmt->GetNumRule()->GetLevel(0).GetStart()), sal_Int16(3) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's start number is wrong!", sal_Int16(3), sal_Int16(pNumFmt->GetNumRule()->GetLevel(0).GetStart()) ); xDocShRef->DoClose(); } diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index c77d77480178..7e37d3c6ad0b 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -2243,7 +2243,7 @@ void SdImportTest::testTdf108925() const SvxNumBulletItem *pNumFmt = aEdit.GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET); CPPUNIT_ASSERT(pNumFmt); - CPPUNIT_ASSERT_EQUAL(pNumFmt->GetNumRule()->GetLevel(0).GetBulletRelSize(), sal_uInt16(25)); + CPPUNIT_ASSERT_EQUAL(sal_uInt16(25), pNumFmt->GetNumRule()->GetLevel(0).GetBulletRelSize()); xDocShRef->DoClose(); } @@ -2540,7 +2540,7 @@ void SdImportTest::testTdf116899() anim::create_deep_vector(xRootNode, aAnimVector); uno::Reference< animations::XAnimate > xNode( aAnimVector[8], uno::UNO_QUERY_THROW ); - CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of key times in the animation node isn't 2.", xNode->getKeyTimes().getLength(), static_cast<sal_Int32>(2) ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Number of key times in the animation node isn't 2.", static_cast<sal_Int32>(2), xNode->getKeyTimes().getLength() ); CPPUNIT_ASSERT_EQUAL_MESSAGE( "First key time in the animation node isn't 0, key times aren't normalized.", 0., xNode->getKeyTimes()[0] ); CPPUNIT_ASSERT_EQUAL_MESSAGE( "Second key time in the animation node isn't 1, key times aren't normalized.", 1., xNode->getKeyTimes()[1] ); } @@ -2553,9 +2553,9 @@ void SdImportTest::testTdf77747() CPPUNIT_ASSERT_MESSAGE("No text object", pTxtObj != nullptr); const SvxNumBulletItem *pNumFmt = pTxtObj->GetOutlinerParaObject()->GetTextObject().GetParaAttribs(0).GetItem(EE_PARA_NUMBULLET); CPPUNIT_ASSERT(pNumFmt); - CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's suffix is wrong!", pNumFmt->GetNumRule()->GetLevel(0).GetSuffix(), OUString("-") ); - CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's numbering type is wrong!", pNumFmt->GetNumRule()->GetLevel(0).GetNumberingType(), - SVX_NUM_NUMBER_HEBREW); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's suffix is wrong!", OUString("-"), pNumFmt->GetNumRule()->GetLevel(0).GetSuffix() ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Bullet's numbering type is wrong!", SVX_NUM_NUMBER_HEBREW, + pNumFmt->GetNumRule()->GetLevel(0).GetNumberingType()); xDocShRef->DoClose(); } diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index 7f3ad5a68a39..31d0b52ff2d3 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -743,7 +743,7 @@ void SdTiledRenderingTest::testInsertDeletePage() comphelper::dispatchCommand(".uno:InsertPage", aArgs); osl::Condition::Result aResult = m_aDocumentSizeCondition.wait(std::chrono::seconds(2)); - CPPUNIT_ASSERT_EQUAL(aResult, osl::Condition::result_ok); + CPPUNIT_ASSERT_EQUAL(osl::Condition::result_ok, aResult); // Verify inserted slides std::vector<OUString> aPageList(getCurrentParts(pXImpressDocument)); @@ -760,7 +760,7 @@ void SdTiledRenderingTest::testInsertDeletePage() comphelper::dispatchCommand(".uno:DeletePage", aArgs); aResult = m_aDocumentSizeCondition.wait(std::chrono::seconds(2)); - CPPUNIT_ASSERT_EQUAL(aResult, osl::Condition::result_ok); + CPPUNIT_ASSERT_EQUAL(osl::Condition::result_ok, aResult); // Verify deleted slides aPageList = getCurrentParts(pXImpressDocument); @@ -776,7 +776,7 @@ void SdTiledRenderingTest::testInsertDeletePage() comphelper::dispatchCommand(".uno:Undo", aArgs); aResult = m_aDocumentSizeCondition.wait(std::chrono::seconds(2)); - CPPUNIT_ASSERT_EQUAL(aResult, osl::Condition::result_ok); + CPPUNIT_ASSERT_EQUAL(osl::Condition::result_ok, aResult); // Verify inserted slides aPageList = getCurrentParts(pXImpressDocument); @@ -792,7 +792,7 @@ void SdTiledRenderingTest::testInsertDeletePage() comphelper::dispatchCommand(".uno:Redo", aArgs); aResult = m_aDocumentSizeCondition.wait(std::chrono::seconds(2)); - CPPUNIT_ASSERT_EQUAL(aResult, osl::Condition::result_ok); + CPPUNIT_ASSERT_EQUAL(osl::Condition::result_ok, aResult); // Verify deleted slides aPageList = getCurrentParts(pXImpressDocument); @@ -1561,7 +1561,7 @@ void SdTiledRenderingTest::testTdf104405() OString aPrefix = "/SdDrawDocument/SdrModel/SdPage/SdrObjList/SdrTableObj/SdrTableObjImpl" "/TableModel/Cell[1]/DefaultProperties/SfxItemSet/SdrTextVertAdjustItem"; // the following name has a compiler-dependent part - CPPUNIT_ASSERT_EQUAL(getXPath(pXmlDoc, aPrefix, "value"), OUString("2")); + CPPUNIT_ASSERT_EQUAL(OUString("2"), getXPath(pXmlDoc, aPrefix, "value")); xmlFreeDoc(pXmlDoc); comphelper::LibreOfficeKit::setActive(false); |