diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-01-27 09:13:31 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-01-27 09:00:59 +0000 |
commit | 777a15db74a48ec5341e5b835240db3050605649 (patch) | |
tree | ed99dbc8cdc179aca55c34faec7f0cb11becac1a /libreofficekit | |
parent | 9a61fdbf0b64dac30a2fe098388cd20471cca7bb (diff) |
CppunitTest_libreofficekit_tiledrendering: fix cppunitassertequals warnings
Change-Id: I0fce00d4c794918e5b14b2c4f3f9f36231f28718
Reviewed-on: https://gerrit.libreoffice.org/33604
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'libreofficekit')
-rw-r--r-- | libreofficekit/qa/unit/tiledrendering.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libreofficekit/qa/unit/tiledrendering.cxx b/libreofficekit/qa/unit/tiledrendering.cxx index 1df2eff37f54..5987d14e566a 100644 --- a/libreofficekit/qa/unit/tiledrendering.cxx +++ b/libreofficekit/qa/unit/tiledrendering.cxx @@ -144,7 +144,7 @@ void TiledRenderingTest::testDocumentTypes( Office* pOffice ) // FIXME: same comment as below wrt lockfile removal. 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 } @@ -162,9 +162,9 @@ void TiledRenderingTest::testImpressSlideNames( Office* pOffice ) std::unique_ptr< Document> pDocument( pOffice->documentLoad( sDocPath.c_str() ) ); - CPPUNIT_ASSERT( pDocument->getParts() == 3 ); - CPPUNIT_ASSERT( strcmp( pDocument->getPartName( 0 ), "TestText1" ) == 0 ); - CPPUNIT_ASSERT( strcmp( pDocument->getPartName( 1 ), "TestText2" ) == 0 ); + CPPUNIT_ASSERT_EQUAL(3, pDocument->getParts()); + CPPUNIT_ASSERT_EQUAL(std::string("TestText1"), std::string(pDocument->getPartName(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 // context menu in Impress), thus it should (as far as I can determine) // have a localised version of "Slide 3". @@ -180,10 +180,10 @@ void TiledRenderingTest::testCalcSheetNames( Office* pOffice ) std::unique_ptr< Document> pDocument( pOffice->documentLoad( sDocPath.c_str() ) ); - CPPUNIT_ASSERT( pDocument->getParts() == 3 ); - CPPUNIT_ASSERT( strcmp( pDocument->getPartName( 0 ), "TestText1" ) == 0 ); - CPPUNIT_ASSERT( strcmp( pDocument->getPartName( 1 ), "TestText2" ) == 0 ); - CPPUNIT_ASSERT( strcmp( pDocument->getPartName( 2 ), "Sheet3" ) == 0 ); + CPPUNIT_ASSERT_EQUAL(3, pDocument->getParts()); + CPPUNIT_ASSERT_EQUAL(std::string("TestText1"), std::string(pDocument->getPartName(0))); + CPPUNIT_ASSERT_EQUAL(std::string("TestText2"), std::string(pDocument->getPartName(1))); + CPPUNIT_ASSERT_EQUAL(std::string("Sheet3"), std::string(pDocument->getPartName(2))); } #if 0 |