diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-10-28 09:04:39 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-10-28 11:14:07 +0200 |
commit | ddb4600cd0672a1df8a8ca916c89fd1d2be407af (patch) | |
tree | bce2f6e69056d696052f7ec50bf76c9153a95a1b /sd/qa/unit | |
parent | 807151aa13ce788adc2cd3b452ceec9177430304 (diff) |
sd: fix loplugin:cppunitassertequals warnings
Change-Id: Id2dc5762668b7c3f78f0a0a1ede97d4ac63fab5d
Diffstat (limited to 'sd/qa/unit')
-rw-r--r-- | sd/qa/unit/export-tests-ooxml1.cxx | 6 | ||||
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 6 | ||||
-rw-r--r-- | sd/qa/unit/import-tests.cxx | 2 | ||||
-rw-r--r-- | sd/qa/unit/tiledrendering/tiledrendering.cxx | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index db2d760065af..8f2ef494ff7c 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -259,16 +259,16 @@ void SdOOXMLExportTest1::testN828390_4() { const SvxFontHeightItem * pFontHeight = dynamic_cast<const SvxFontHeightItem *>((*it).pAttr); if( pFontHeight ) - CPPUNIT_ASSERT_MESSAGE( "Font height is wrong", pFontHeight->GetHeight() == 1129 ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font height is wrong", static_cast<sal_uInt32>(1129), pFontHeight->GetHeight() ); const SvxFontItem *pFont = dynamic_cast<const SvxFontItem *>((*it).pAttr); if( pFont ) { - CPPUNIT_ASSERT_MESSAGE( "Font is wrong", pFont->GetFamilyName() == "Arial"); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font is wrong", OUString("Arial"), pFont->GetFamilyName() ); bPassed = true; } const SvxWeightItem *pWeight = dynamic_cast<const SvxWeightItem *>((*it).pAttr); if( pWeight ) - CPPUNIT_ASSERT_MESSAGE( "Font Weight is wrong", pWeight->GetWeight() == WEIGHT_BOLD); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font Weight is wrong", WEIGHT_BOLD, pWeight->GetWeight() ); } } CPPUNIT_ASSERT(bPassed); diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 014720e1f7d6..3f2882384031 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -144,7 +144,7 @@ void SdExportTest::testN821567() xDocShRef = saveAndReload( xDocShRef.get(), ODP ); uno::Reference< drawing::XDrawPagesSupplier > xDoc( xDocShRef->GetDoc()->getUnoModel(), uno::UNO_QUERY_THROW ); - CPPUNIT_ASSERT_MESSAGE( "not exactly one page", xDoc->getDrawPages()->getCount() == 1 ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( "not exactly one page", static_cast<sal_Int32>(1), xDoc->getDrawPages()->getCount() ); uno::Reference< drawing::XDrawPage > xPage( getPage( 0, xDocShRef ) ); uno::Reference< beans::XPropertySet > xPropSet( xPage, uno::UNO_QUERY ); @@ -281,7 +281,7 @@ void SdExportTest::testSwappedOutImageExport() // Check whether graphic exported well after it was swapped out uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(xDocShRef->GetModel(), uno::UNO_QUERY); - CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), xDrawPagesSupplier->getDrawPages()->getCount() == 2 ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( sFailedMessage.getStr(), static_cast<sal_Int32>(2), xDrawPagesSupplier->getDrawPages()->getCount()); uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW ); uno::Reference<drawing::XShape> xImage(xDrawPage->getByIndex(2), uno::UNO_QUERY); @@ -449,7 +449,7 @@ void SdExportTest::testImageWithSpecialID() // Check whether graphic was exported well uno::Reference<drawing::XDrawPagesSupplier> xDrawPagesSupplier(xDocShRef->GetModel(), uno::UNO_QUERY); - CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), xDrawPagesSupplier->getDrawPages()->getCount() == 2 ); + CPPUNIT_ASSERT_EQUAL_MESSAGE( sFailedMessage.getStr(), static_cast<sal_Int32>(2), xDrawPagesSupplier->getDrawPages()->getCount() ); uno::Reference< drawing::XDrawPage > xDrawPage( xDrawPagesSupplier->getDrawPages()->getByIndex(0), uno::UNO_QUERY_THROW ); uno::Reference<drawing::XShape> xImage(xDrawPage->getByIndex(2), uno::UNO_QUERY); diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx index c85fda8f5cfe..1d0eef1adf7f 100644 --- a/sd/qa/unit/import-tests.cxx +++ b/sd/qa/unit/import-tests.cxx @@ -1389,7 +1389,7 @@ void SdImportTest::testTdf99729() // If text alignment is wrong, the rectangle will be white. CPPUNIT_ASSERT_MESSAGE("Tdf99729: vertical alignment of text is incorrect!", nonwhitecounts[0]>100); // it is 134 with cleartype disabled // The numbers 1-9 should be below the Text Box -> rectangle 154,16 - 170,112 should be white. - CPPUNIT_ASSERT_MESSAGE("Tdf99729: legacy vertical alignment of text is incorrect!", nonwhitecounts[1] == 0); + CPPUNIT_ASSERT_EQUAL_MESSAGE("Tdf99729: legacy vertical alignment of text is incorrect!", 0, nonwhitecounts[1]); } void SdImportTest::testTdf89927() diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx index 049b9568eab9..f930df8b310b 100644 --- a/sd/qa/unit/tiledrendering/tiledrendering.cxx +++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx @@ -648,7 +648,7 @@ void SdTiledRenderingTest::testInsertDeletePage() }; // the document has 1 slide - CPPUNIT_ASSERT(pDoc->GetSdPageCount(PageKind::Standard) == 1); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(1), pDoc->GetSdPageCount(PageKind::Standard)); uno::Sequence<beans::PropertyValue> aArgs; @@ -719,7 +719,7 @@ void SdTiledRenderingTest::testInsertDeletePage() } // the document has 1 slide - CPPUNIT_ASSERT(pDoc->GetSdPageCount(PageKind::Standard) == 1); + CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(1), pDoc->GetSdPageCount(PageKind::Standard)); comphelper::LibreOfficeKit::setActive(false); } |