diff options
Diffstat (limited to 'cppu/test')
-rw-r--r-- | cppu/test/test_di.cxx | 15 | ||||
-rw-r--r-- | cppu/test/testcppu.cxx | 15 |
2 files changed, 23 insertions, 7 deletions
diff --git a/cppu/test/test_di.cxx b/cppu/test/test_di.cxx index bbc7bf765c9f..961d6d3448ff 100644 --- a/cppu/test/test_di.cxx +++ b/cppu/test/test_di.cxx @@ -2,9 +2,9 @@ * * $RCSfile: test_di.cxx,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: dbo $ $Date: 2002-04-24 13:43:27 $ + * last change: $Author: dbo $ $Date: 2002-08-19 07:18:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,6 +79,7 @@ #include <cppuhelper/implbase1.hxx> +#include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/lang/DisposedException.hpp> @@ -653,6 +654,16 @@ static void checkInvalidInterfaceQuery( catch (RuntimeException &) { } + try + { + Reference< lang::XComponent > xComp( xObj, UNO_QUERY_THROW ); + OSL_ASSERT( 0 ); + } + catch (RuntimeException & exc) + { +// OString str( OUStringToOString( exc.Message, RTL_TEXTENCODING_ASCII_US ) ); +// OSL_TRACE( str.getStr() ); + } } //================================================================================================== diff --git a/cppu/test/testcppu.cxx b/cppu/test/testcppu.cxx index 10ba472387dc..1ebc678e4c48 100644 --- a/cppu/test/testcppu.cxx +++ b/cppu/test/testcppu.cxx @@ -2,9 +2,9 @@ * * $RCSfile: testcppu.cxx,v $ * - * $Revision: 1.24 $ + * $Revision: 1.25 $ * - * last change: $Author: dbo $ $Date: 2001-10-17 13:02:12 $ + * last change: $Author: dbo $ $Date: 2002-08-19 07:18:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -324,6 +324,8 @@ nPos = (sal_Int32)&((Test3 *)0)->aAny; a3.td.dDouble = 2; a3.bBool = sal_True; a3.aAny = makeAny( (sal_Int32)2 ); + OSL_ASSERT( a3.aAny.isExtractableTo( ::getCppuType( (sal_Int64 const *)0 ) ) ); + OSL_ASSERT( ::getCppuType( (sal_Int64 const *)0 ).isAssignableFrom( a3.aAny.getValueType() ) ); bAssignable = uno_type_assignData( &sz3, getCppuType( (Test3*)0).getTypeLibType(), &a3, getCppuType( (Test3*)0).getTypeLibType(), @@ -1129,10 +1131,13 @@ int SAL_CALL main(int argc, char **argv) test_interface(); test_inheritance(); - // shutdown #ifdef SAL_W32 - Reference< XComponent > xComp( xContext, UNO_QUERY ); - OSL_ENSURE( xComp.is(), "### root component context implement XComponent!" ); + // shutdown + Reference< XComponent > xComp( xContext, UNO_QUERY_THROW ); + xComp.set( xContext, UNO_QUERY_THROW ); + Reference< XInterface > x( + xContext->getValueByName( + OUString( RTL_CONSTASCII_USTRINGPARAM("/singletons/com.sun.star.reflection.theTypeDescriptionManager") ) ), UNO_QUERY_THROW ); xComp->dispose(); #endif } |