diff options
author | Jörg Budischewski <jbu@openoffice.org> | 2001-07-04 07:41:23 +0000 |
---|---|---|
committer | Jörg Budischewski <jbu@openoffice.org> | 2001-07-04 07:41:23 +0000 |
commit | 654fd0340ac45112eebe73120903c6e51995ec1b (patch) | |
tree | f60fe52aa9d469f11a083e18b716b8f9b376eec4 /testtools | |
parent | ce6274df7d179bc6b47d9f0344b07c988cfe4c7f (diff) |
#88717# queryInterface for an unknown type is now tested (feature was introduced in UDK302b/UDK300o
Diffstat (limited to 'testtools')
-rw-r--r-- | testtools/source/bridgetest/bridgetest.cxx | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx index a9814a693e37..4bc66c09d580 100644 --- a/testtools/source/bridgetest/bridgetest.cxx +++ b/testtools/source/bridgetest/bridgetest.cxx @@ -1,7 +1,7 @@ /************************************************************************** #* -#* last change $Author: kr $ $Date: 2001-05-04 07:05:17 $ -#* $Revision: 1.1 $ +#* last change $Author: jbu $ $Date: 2001-07-04 08:41:23 $ +#* $Revision: 1.2 $ #* #* $Logfile: $ #* @@ -278,6 +278,7 @@ static sal_Bool performRecursiveCallTest( const Reference < XBridgeTest > & xLBT static sal_Bool performTest( const Reference<XBridgeTest > & xLBT ) { OSL_ENSURE( xLBT.is(), "### no test interface!" ); + sal_Bool bRet = sal_False; if (xLBT.is()) { // this data is never ever granted access to by calls other than equals(), assign()! @@ -391,10 +392,20 @@ static sal_Bool performTest( const Reference<XBridgeTest > & xLBT ) // recursive call test OSL_ASSERT( performRecursiveCallTest( xLBT ) ); - return (equals( aData, aRet ) && equals( aData, aRet2 )); + bRet = (equals( aData, aRet ) && equals( aData, aRet2 )); + } + { + // test queryInterface for an unknown type + typelib_TypeDescriptionReference *pTypeRef = 0; + OUString aName( RTL_CONSTASCII_USTRINGPARAM( "foo.MyInterface" ) ); + typelib_typedescriptionreference_new( + &pTypeRef, typelib_TypeClass_INTERFACE, aName.pData); + Any a = xLBT->queryInterface( Type( pTypeRef ) ); + typelib_typedescriptionreference_release( pTypeRef ); + bRet = bRet && ( a == Any( )); } } - return sal_False; + return bRet; } static sal_Bool raiseOnewayException( const Reference < XBridgeTest > & xLBT ) { @@ -656,6 +667,9 @@ void * SAL_CALL component_getFactory( /************************************************************************** $Log: not supported by cvs2svn $ + Revision 1.1 2001/05/04 07:05:17 kr + moved from grande to openoffice + Revision 1.3 2001/03/12 16:22:44 jl OSL_ENSHURE replaced by OSL_ENSURE |