[Libreoffice-commits] core.git: dbaccess/qa sc/qa

Lionel Elie Mamane lionel at mamane.lu
Sat Aug 3 12:02:40 PDT 2013


 dbaccess/qa/extras/macros-test.cxx |    1 +
 sc/qa/extras/macros-test.cxx       |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 63572992755a9e2f5ba3e73bbe10ab145f102896
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Sat Aug 3 10:50:14 2013 +0200

    minor tweaks to existing unittests
    
    Change-Id: I64769fee917c5d8c6450a19ad53fdf795e280c98

diff --git a/dbaccess/qa/extras/macros-test.cxx b/dbaccess/qa/extras/macros-test.cxx
index 24f78e5..cc0a437 100644
--- a/dbaccess/qa/extras/macros-test.cxx
+++ b/dbaccess/qa/extras/macros-test.cxx
@@ -80,6 +80,7 @@ void DBAccessTest::setUp()
     // This is a bit of a fudge, we do this to ensure that ScGlobals::ensure,
     // which is a private symbol to us, gets called
     mxDesktop = com::sun::star::frame::Desktop::create( comphelper::getComponentContext(getMultiServiceFactory()) );
+    CPPUNIT_ASSERT(mxDesktop.is());
 }
 
 void DBAccessTest::tearDown()
diff --git a/sc/qa/extras/macros-test.cxx b/sc/qa/extras/macros-test.cxx
index 023f627..074edb5 100644
--- a/sc/qa/extras/macros-test.cxx
+++ b/sc/qa/extras/macros-test.cxx
@@ -9,7 +9,6 @@
 
 #include <sal/config.h>
 #include <test/unoapi_test.hxx>
-#include <unotest/macros_test.hxx>
 #include <rtl/strbuf.hxx>
 #include <osl/file.hxx>
 
@@ -81,7 +80,8 @@ void ScMacrosTest::testMSP()
     SfxObjectShell* pFoundShell = SfxObjectShell::GetShellFromComponent(xComponent);
 
     CPPUNIT_ASSERT_MESSAGE("Failed to access document shell", pFoundShell);
-    ScDocShell* xDocSh = static_cast<ScDocShell*>(pFoundShell);
+    ScDocShell* xDocSh = dynamic_cast<ScDocShell*>(pFoundShell);
+    CPPUNIT_ASSERT(xDocSh != NULL);
 
     pFoundShell->CallXScript(xComponent, sUrl, aParams, aRet, aOutParamIndex,aOutParam);
     OUString sResult;


More information about the Libreoffice-commits mailing list