diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-05-11 11:59:06 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-05-11 12:17:37 +0200 |
commit | 598b05f053a75abca920cafa208af2950bdcd1f7 (patch) | |
tree | b3d95bfec07be5832594d79ba0a4f9017e79709f /libreofficekit | |
parent | 38cb71ceae37f51d37a3c7c56734f2678e733e76 (diff) |
CppunitTest_libreofficekit_tiledrendering: add postUnoCommand() testcase
This fails without commit d4a12421f2b0aafe97f8ab78017261969c36ae0e
(desktop: pJSON may be 0 in jsonToPropertyValues(), 2015-04-29).
Change-Id: I08fffe65eb6cdc94fcfc57c2b8f1ec9fa546f70d
Diffstat (limited to 'libreofficekit')
-rw-r--r-- | libreofficekit/qa/unit/tiledrendering.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libreofficekit/qa/unit/tiledrendering.cxx b/libreofficekit/qa/unit/tiledrendering.cxx index 0d330970b044..63eb756b9d20 100644 --- a/libreofficekit/qa/unit/tiledrendering.cxx +++ b/libreofficekit/qa/unit/tiledrendering.cxx @@ -125,7 +125,11 @@ void TiledRenderingTest::testDocumentTypes( Office* pOffice ) // FIXME: same comment as below wrt lockfile removal. remove( sTextLockFile.c_str() ); - CPPUNIT_ASSERT( getDocumentType( pOffice, sTextDocPath ) == LOK_DOCTYPE_TEXT ); + std::unique_ptr<Document> pDocument(pOffice->documentLoad( sTextDocPath.c_str())); + CPPUNIT_ASSERT(pDocument.get()); + CPPUNIT_ASSERT_EQUAL(LOK_DOCTYPE_TEXT, static_cast<LibreOfficeKitDocumentType>(pDocument->getDocumentType())); + // This crashed. + pDocument->postUnoCommand(".uno:Bold"); const string sPresentationDocPath = m_sSrcRoot + "/libreofficekit/qa/data/blank_presentation.odp"; const string sPresentationLockFile = m_sSrcRoot +"/libreofficekit/qa/data/.~lock.blank_presentation.odp#"; |