Kaydet (Commit) 777a15db authored tarafından Miklos Vajna's avatar Miklos Vajna

CppunitTest_libreofficekit_tiledrendering: fix cppunitassertequals warnings

Change-Id: I0fce00d4c794918e5b14b2c4f3f9f36231f28718
Reviewed-on: https://gerrit.libreoffice.org/33604Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 9a61fdbf
...@@ -144,7 +144,7 @@ void TiledRenderingTest::testDocumentTypes( Office* pOffice ) ...@@ -144,7 +144,7 @@ void TiledRenderingTest::testDocumentTypes( Office* pOffice )
// FIXME: same comment as below wrt lockfile removal. // FIXME: same comment as below wrt lockfile removal.
remove( sPresentationLockFile.c_str() ); remove( sPresentationLockFile.c_str() );
CPPUNIT_ASSERT( getDocumentType( pOffice, sPresentationDocPath ) == LOK_DOCTYPE_PRESENTATION ); CPPUNIT_ASSERT_EQUAL(LOK_DOCTYPE_PRESENTATION, static_cast<LibreOfficeKitDocumentType>(getDocumentType(pOffice, sPresentationDocPath)));
// TODO: do this for all supported document types // TODO: do this for all supported document types
} }
...@@ -162,9 +162,9 @@ void TiledRenderingTest::testImpressSlideNames( Office* pOffice ) ...@@ -162,9 +162,9 @@ void TiledRenderingTest::testImpressSlideNames( Office* pOffice )
std::unique_ptr< Document> pDocument( pOffice->documentLoad( sDocPath.c_str() ) ); std::unique_ptr< Document> pDocument( pOffice->documentLoad( sDocPath.c_str() ) );
CPPUNIT_ASSERT( pDocument->getParts() == 3 ); CPPUNIT_ASSERT_EQUAL(3, pDocument->getParts());
CPPUNIT_ASSERT( strcmp( pDocument->getPartName( 0 ), "TestText1" ) == 0 ); CPPUNIT_ASSERT_EQUAL(std::string("TestText1"), std::string(pDocument->getPartName(0)));
CPPUNIT_ASSERT( strcmp( pDocument->getPartName( 1 ), "TestText2" ) == 0 ); CPPUNIT_ASSERT_EQUAL(std::string("TestText2"), std::string(pDocument->getPartName(1)));
// The third slide hasn't had a name given to it (i.e. using the rename // The third slide hasn't had a name given to it (i.e. using the rename
// context menu in Impress), thus it should (as far as I can determine) // context menu in Impress), thus it should (as far as I can determine)
// have a localised version of "Slide 3". // have a localised version of "Slide 3".
...@@ -180,10 +180,10 @@ void TiledRenderingTest::testCalcSheetNames( Office* pOffice ) ...@@ -180,10 +180,10 @@ void TiledRenderingTest::testCalcSheetNames( Office* pOffice )
std::unique_ptr< Document> pDocument( pOffice->documentLoad( sDocPath.c_str() ) ); std::unique_ptr< Document> pDocument( pOffice->documentLoad( sDocPath.c_str() ) );
CPPUNIT_ASSERT( pDocument->getParts() == 3 ); CPPUNIT_ASSERT_EQUAL(3, pDocument->getParts());
CPPUNIT_ASSERT( strcmp( pDocument->getPartName( 0 ), "TestText1" ) == 0 ); CPPUNIT_ASSERT_EQUAL(std::string("TestText1"), std::string(pDocument->getPartName(0)));
CPPUNIT_ASSERT( strcmp( pDocument->getPartName( 1 ), "TestText2" ) == 0 ); CPPUNIT_ASSERT_EQUAL(std::string("TestText2"), std::string(pDocument->getPartName(1)));
CPPUNIT_ASSERT( strcmp( pDocument->getPartName( 2 ), "Sheet3" ) == 0 ); CPPUNIT_ASSERT_EQUAL(std::string("Sheet3"), std::string(pDocument->getPartName(2)));
} }
#if 0 #if 0
......
...@@ -73,7 +73,7 @@ ToxLinkProcessorTest::NoExceptionIsThrownIfTooManyLinksAreClosed() ...@@ -73,7 +73,7 @@ ToxLinkProcessorTest::NoExceptionIsThrownIfTooManyLinksAreClosed()
sut.CloseLink(2, URL_1); sut.CloseLink(2, URL_1);
CPPUNIT_ASSERT_EQUAL(1u, static_cast<unsigned>(sut.m_ClosedLinks.size())); CPPUNIT_ASSERT_EQUAL(1u, static_cast<unsigned>(sut.m_ClosedLinks.size()));
CPPUNIT_ASSERT_EQUAL(1u, static_cast<unsigned>(sut.m_ClosedLinks.at(0)->mEndTextPos)); CPPUNIT_ASSERT_EQUAL(1u, static_cast<unsigned>(sut.m_ClosedLinks.at(0)->mEndTextPos));
CPPUNIT_ASSERT_MESSAGE("no links are open", sut.m_pStartedLink == nullptr); CPPUNIT_ASSERT_MESSAGE("no links are open", !sut.m_pStartedLink);
} }
void void
...@@ -87,7 +87,7 @@ ToxLinkProcessorTest::AddingAndClosingTwoOverlappingLinksResultsInOneClosedLink( ...@@ -87,7 +87,7 @@ ToxLinkProcessorTest::AddingAndClosingTwoOverlappingLinksResultsInOneClosedLink(
// (for backward compatibility) // (for backward compatibility)
sut.CloseLink(1, URL_2); sut.CloseLink(1, URL_2);
CPPUNIT_ASSERT_EQUAL(1u, static_cast<unsigned>(sut.m_ClosedLinks.size())); CPPUNIT_ASSERT_EQUAL(1u, static_cast<unsigned>(sut.m_ClosedLinks.size()));
CPPUNIT_ASSERT_MESSAGE("no links are open", sut.m_pStartedLink == nullptr); CPPUNIT_ASSERT_MESSAGE("no links are open", !sut.m_pStartedLink);
// backward compatibility: the last start is closed by the first end // backward compatibility: the last start is closed by the first end
CPPUNIT_ASSERT_EQUAL(STYLE_NAME_2, sut.m_ClosedLinks[0]->mINetFormat.GetINetFormat()); CPPUNIT_ASSERT_EQUAL(STYLE_NAME_2, sut.m_ClosedLinks[0]->mINetFormat.GetINetFormat());
CPPUNIT_ASSERT_EQUAL(URL_1, sut.m_ClosedLinks[0]->mINetFormat.GetValue()); CPPUNIT_ASSERT_EQUAL(URL_1, sut.m_ClosedLinks[0]->mINetFormat.GetValue());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment