diff options
author | Thorsten Behrens <tbehrens@novell.com> | 2010-11-07 00:15:27 +0100 |
---|---|---|
committer | Thorsten Behrens <tbehrens@novell.com> | 2010-11-15 17:43:14 +0100 |
commit | f1c45fad02ee12937b4e80dfac3db5f97ea9dbc9 (patch) | |
tree | 72de3a1c964993471cf4d23a6b0282bf3dba92ea /slideshow | |
parent | f37609830b20839ce2a4c9aee0ec57435d5112a2 (diff) |
Make slideshow unittest work again
Well, it still fails. But for all the right reasons.
Diffstat (limited to 'slideshow')
-rw-r--r-- | slideshow/test/demoshow.cxx | 12 | ||||
-rw-r--r-- | slideshow/test/export.map | 2 | ||||
-rw-r--r-- | slideshow/test/makefile.mk | 12 | ||||
-rw-r--r-- | slideshow/test/slidetest.cxx | 9 | ||||
-rw-r--r-- | slideshow/test/testshape.cxx | 5 | ||||
-rw-r--r-- | slideshow/test/testview.cxx | 19 | ||||
-rw-r--r-- | slideshow/test/views.cxx | 12 |
7 files changed, 55 insertions, 16 deletions
diff --git a/slideshow/test/demoshow.cxx b/slideshow/test/demoshow.cxx index cd0435849eb3..6e80a3637f32 100644 --- a/slideshow/test/demoshow.cxx +++ b/slideshow/test/demoshow.cxx @@ -54,6 +54,7 @@ #include <ucbhelper/configurationkeys.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> +#include <basegfx/matrix/b2dhommatrixtools.hxx> #include <basegfx/tools/canvastools.hxx> #include <basegfx/range/b2drectangle.hxx> #include <basegfx/polygon/b2dpolygon.hxx> @@ -199,6 +200,11 @@ private: { } + virtual awt::Rectangle SAL_CALL getCanvasArea( ) throw (uno::RuntimeException) + { + return awt::Rectangle(0,0,maSize.Width(),maSize.Height()); + } + uno::Reference< rendering::XSpriteCanvas > mxCanvas; ::cppu::OInterfaceContainerHelper maPaintListeners; ::cppu::OInterfaceContainerHelper maTransformationListeners; @@ -418,7 +424,7 @@ DemoWindow::DemoWindow() : maUpdateTimer(), mbSlideDisplayed( false ) { - SetText( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Slideshow Demo" )) ); + SetText( rtl::OUString::createFromAscii( "Slideshow Demo" ) ); SetSizePixel( Size( 640, 480 ) ); EnablePaint( true ); @@ -456,11 +462,13 @@ void DemoWindow::init() if( mxShow.is() && !mbSlideDisplayed ) { uno::Reference< drawing::XDrawPage > xSlide( new DummySlide ); + uno::Reference< drawing::XDrawPages > xDrawPages; mxShow->displaySlide( xSlide, + uno::Reference< drawing::XDrawPagesSupplier >(), uno::Reference< animations::XAnimationNode >(), uno::Sequence< beans::PropertyValue >() ); mxShow->setProperty( beans::PropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RehearseTimings")), + rtl::OUString::createFromAscii("RehearseTimings"), 0, uno::makeAny( sal_True ), beans::PropertyState_DIRECT_VALUE )); diff --git a/slideshow/test/export.map b/slideshow/test/export.map index 7321bbca16ad..3308588ef6f8 100644 --- a/slideshow/test/export.map +++ b/slideshow/test/export.map @@ -27,7 +27,7 @@ UDK_3_0_0 { global: - registerAllTestFunction; + cppunitTestPlugIn; local: *; diff --git a/slideshow/test/makefile.mk b/slideshow/test/makefile.mk index c86d166b95a2..c7f63bb14e7d 100644 --- a/slideshow/test/makefile.mk +++ b/slideshow/test/makefile.mk @@ -39,6 +39,15 @@ ENABLE_EXCEPTIONS=TRUE .INCLUDE : settings.mk .INCLUDE : $(PRJ)$/util$/makefile.pmk +#building with stlport, but cppunit was not built with stlport +.IF "$(USE_SYSTEM_STL)"!="YES" +.IF "$(SYSTEM_CPPUNIT)"=="YES" +CFLAGSCXX+=-DADAPT_EXT_STL +.ENDIF +.ENDIF + +CFLAGSCXX += $(CPPUNIT_CFLAGS) + # --- Common ---------------------------------------------------------- # BEGIN target1 ------------------------------------------------------- @@ -53,7 +62,6 @@ SHL1STDLIBS= $(SALLIB) \ $(BASEGFXLIB) \ $(CPPUHELPERLIB) \ $(CPPULIB) \ - $(TESTSHL2LIB) \ $(CPPUNITLIB) \ $(UNOTOOLSLIB) \ $(VCLLIB) @@ -68,6 +76,8 @@ SHL1IMPLIB= i$(SHL1TARGET) DEF1NAME =$(SHL1TARGET) SHL1VERSIONMAP = export.map +SHL1RPATH = NONE + # END target1 ---------------------------------------------------------- # BEGIN target2 -------------------------------------------------------- diff --git a/slideshow/test/slidetest.cxx b/slideshow/test/slidetest.cxx index b3a33f2823d5..df3fc0f4f6a6 100644 --- a/slideshow/test/slidetest.cxx +++ b/slideshow/test/slidetest.cxx @@ -26,7 +26,11 @@ * ************************************************************************/ -#include <testshl/simpleheader.hxx> +#include <cppunit/TestAssert.h> +#include <cppunit/TestFixture.h> +#include <cppunit/extensions/HelperMacros.h> +#include "cppunit/plugin/TestPlugIn.h" + #include <cppuhelper/compbase1.hxx> #include <comphelper/broadcasthelper.hxx> @@ -365,8 +369,9 @@ public: }; // class LayerManagerTest // ----------------------------------------------------------------------------- -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(LayerManagerTest, "LayerManagerTest"); +CPPUNIT_TEST_SUITE_REGISTRATION(LayerManagerTest); } // namespace +CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/slideshow/test/testshape.cxx b/slideshow/test/testshape.cxx index 92fd95d466d4..9bf39cc0ce8a 100644 --- a/slideshow/test/testshape.cxx +++ b/slideshow/test/testshape.cxx @@ -26,7 +26,10 @@ * ************************************************************************/ -#include <testshl/simpleheader.hxx> +#include <cppunit/TestAssert.h> +#include <cppunit/TestFixture.h> +#include <cppunit/extensions/HelperMacros.h> + #include <cppuhelper/compbase1.hxx> #include <cppuhelper/basemutex.hxx> #include <comphelper/make_shared_from_uno.hxx> diff --git a/slideshow/test/testview.cxx b/slideshow/test/testview.cxx index 036fc05d948d..7d40e03ce63d 100644 --- a/slideshow/test/testview.cxx +++ b/slideshow/test/testview.cxx @@ -26,7 +26,10 @@ * ************************************************************************/ -#include <testshl/simpleheader.hxx> +#include <cppunit/TestAssert.h> +#include <cppunit/TestFixture.h> +#include <cppunit/extensions/HelperMacros.h> + #include <cppuhelper/compbase1.hxx> #include <cppuhelper/basemutex.hxx> #include <comphelper/make_shared_from_uno.hxx> @@ -134,6 +137,11 @@ public: { } + virtual awt::Rectangle SAL_CALL getCanvasArea( ) throw (uno::RuntimeException) + { + return awt::Rectangle(0,0,100,100); + } + // TestView virtual bool isClearCalled() const { @@ -276,6 +284,15 @@ public: { mbDisposed = true; } + + virtual bool isSoundEnabled (void) const + { + return true; + } + + virtual void setIsSoundEnabled (const bool /*bValue*/) + { + } }; diff --git a/slideshow/test/views.cxx b/slideshow/test/views.cxx index f9bb13ee1c37..d27a55a7795f 100644 --- a/slideshow/test/views.cxx +++ b/slideshow/test/views.cxx @@ -26,7 +26,10 @@ * ************************************************************************/ -#include <testshl/simpleheader.hxx> +#include <cppunit/TestAssert.h> +#include <cppunit/TestFixture.h> +#include <cppunit/extensions/HelperMacros.h> + #include <cppuhelper/compbase1.hxx> #include <comphelper/broadcasthelper.hxx> @@ -82,11 +85,4 @@ public: CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(UnoViewContainerTest, "UnoViewContainerTest"); } // namespace - -// ----------------------------------------------------------------------------- - -// this macro creates an empty function, which will called by the RegisterAllFunctions() -// to let the user the possibility to also register some functions by hand. -NOADDITIONAL; - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |