1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: testimplhelper.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #if !defined(OSL_DEBUG_LEVEL) || OSL_DEBUG_LEVEL == 0
32 # undef OSL_DEBUG_LEVEL
33 # define OSL_DEBUG_LEVEL 2
36 // MARKER(update_precomp.py): autogen include statement, do not remove
37 #include "precompiled_cppuhelper.hxx"
41 #include <cppuhelper/implbase1.hxx>
42 #include <cppuhelper/implbase2.hxx>
43 #include <cppuhelper/implbase3.hxx>
44 #include <cppuhelper/implbase4.hxx>
45 #include <cppuhelper/implbase5.hxx>
46 #include <cppuhelper/implbase6.hxx>
47 #include <cppuhelper/implbase7.hxx>
48 #include <cppuhelper/implbase8.hxx>
49 #include <cppuhelper/implbase9.hxx>
50 #include <cppuhelper/implbase10.hxx>
51 #include <cppuhelper/implbase11.hxx>
52 #include <cppuhelper/implbase12.hxx>
54 #include <cppuhelper/compbase1.hxx>
55 #include <cppuhelper/compbase2.hxx>
56 #include <cppuhelper/compbase3.hxx>
57 #include <cppuhelper/compbase4.hxx>
58 #include <cppuhelper/compbase5.hxx>
59 #include <cppuhelper/compbase6.hxx>
60 #include <cppuhelper/compbase7.hxx>
61 #include <cppuhelper/compbase8.hxx>
62 #include <cppuhelper/compbase9.hxx>
63 #include <cppuhelper/compbase10.hxx>
64 #include <cppuhelper/compbase11.hxx>
65 #include <cppuhelper/compbase12.hxx>
67 #include <osl/diagnose.h>
68 #include <cppuhelper/servicefactory.hxx>
69 #include <cppuhelper/implbase4.hxx>
70 #include <cppuhelper/compbase4.hxx>
71 #include <cppuhelper/exc_hlp.hxx>
74 #include <test/BA.hpp>
75 #include <test/CA.hpp>
76 #include <test/DBA.hpp>
78 #include <test/FE.hpp>
83 #include <com/sun/star/lang/IllegalAccessException.hpp>
89 using namespace com::sun::star
;
90 using namespace com::sun::star::uno
;
92 //==================================================================================================
93 struct TestImpl
: public ImplHelper4
< CA
, DBA
, FE
, G
>
98 { OSL_TRACE( "> TestImpl dtor called... <\n" ); }
100 virtual Any SAL_CALL
queryInterface( const Type
& rType
) throw(RuntimeException
)
101 { return ImplHelper4
< CA
, DBA
, FE
, G
>::queryInterface( rType
); }
102 virtual void SAL_CALL
acquire( ) throw()
104 virtual void SAL_CALL
release( ) throw()
105 { if (! --nRef
) delete this; }
108 virtual OUString SAL_CALL
a() throw(RuntimeException
)
109 { return OUString( RTL_CONSTASCII_USTRINGPARAM("a") ); }
111 virtual OUString SAL_CALL
ba() throw(RuntimeException
)
112 { return OUString( RTL_CONSTASCII_USTRINGPARAM("ba") ); }
114 virtual OUString SAL_CALL
ca() throw(RuntimeException
)
115 { return OUString( RTL_CONSTASCII_USTRINGPARAM("ca") ); }
117 virtual OUString SAL_CALL
dba() throw(RuntimeException
)
118 { return OUString( RTL_CONSTASCII_USTRINGPARAM("dba") ); }
120 virtual OUString SAL_CALL
e() throw(RuntimeException
)
121 { return OUString( RTL_CONSTASCII_USTRINGPARAM("e") ); }
123 virtual OUString SAL_CALL
fe() throw(RuntimeException
)
124 { return OUString( RTL_CONSTASCII_USTRINGPARAM("fe") ); }
126 virtual OUString SAL_CALL
g() throw(RuntimeException
)
127 { return OUString( RTL_CONSTASCII_USTRINGPARAM("g") ); }
130 //==================================================================================================
131 struct TestWeakAggImpl
: public WeakAggImplHelper4
< CA
, DBA
, FE
, G
>
133 virtual ~TestWeakAggImpl()
134 { OSL_TRACE( "> TestWeakAggImpl dtor called... <\n" ); }
137 virtual OUString SAL_CALL
a() throw(RuntimeException
)
138 { return OUString( RTL_CONSTASCII_USTRINGPARAM("a") ); }
140 virtual OUString SAL_CALL
ba() throw(RuntimeException
)
141 { return OUString( RTL_CONSTASCII_USTRINGPARAM("ba") ); }
143 virtual OUString SAL_CALL
ca() throw(RuntimeException
)
144 { return OUString( RTL_CONSTASCII_USTRINGPARAM("ca") ); }
146 virtual OUString SAL_CALL
dba() throw(RuntimeException
)
147 { return OUString( RTL_CONSTASCII_USTRINGPARAM("dba") ); }
149 virtual OUString SAL_CALL
e() throw(RuntimeException
)
150 { return OUString( RTL_CONSTASCII_USTRINGPARAM("e") ); }
152 virtual OUString SAL_CALL
fe() throw(RuntimeException
)
153 { return OUString( RTL_CONSTASCII_USTRINGPARAM("fe") ); }
155 virtual OUString SAL_CALL
g() throw(RuntimeException
)
156 { return OUString( RTL_CONSTASCII_USTRINGPARAM("g") ); }
159 //==================================================================================================
160 struct TestWeakImpl
: public WeakImplHelper4
< CA
, DBA
, FE
, G
>
164 virtual ~TestWeakImpl()
165 { OSL_TRACE( "> TestWeakImpl dtor called... <\n" ); }
168 virtual OUString SAL_CALL
a() throw(RuntimeException
)
169 { return OUString( RTL_CONSTASCII_USTRINGPARAM("a") ); }
171 virtual OUString SAL_CALL
ba() throw(RuntimeException
)
172 { return OUString( RTL_CONSTASCII_USTRINGPARAM("ba") ); }
174 virtual OUString SAL_CALL
ca() throw(RuntimeException
)
175 { return OUString( RTL_CONSTASCII_USTRINGPARAM("ca") ); }
177 virtual OUString SAL_CALL
dba() throw(RuntimeException
)
178 { return OUString( RTL_CONSTASCII_USTRINGPARAM("dba") ); }
180 virtual OUString SAL_CALL
e() throw(RuntimeException
)
181 { return OUString( RTL_CONSTASCII_USTRINGPARAM("e") ); }
183 virtual OUString SAL_CALL
fe() throw(RuntimeException
)
184 { return OUString( RTL_CONSTASCII_USTRINGPARAM("fe") ); }
186 virtual OUString SAL_CALL
g() throw(RuntimeException
)
187 { return OUString( RTL_CONSTASCII_USTRINGPARAM("g") ); }
192 TestWeakImpl(int, int) {}
194 TestWeakImpl(int, int, int) {}
196 TestWeakImpl(int, int, int, int) {}
198 TestWeakImpl(int, int, int, int, int) {}
200 TestWeakImpl(int, int, int, int, int, int, int = 0) {}
203 //==================================================================================================
204 struct TestWeakComponentImpl
: public WeakComponentImplHelper4
< CA
, DBA
, FE
, G
>
207 TestWeakComponentImpl()
208 : WeakComponentImplHelper4
< CA
, DBA
, FE
, G
>( m
)
210 virtual ~TestWeakComponentImpl()
211 { OSL_TRACE( "> TestWeakComponentImpl dtor called... <\n" ); }
213 void SAL_CALL
disposing()
214 { OSL_TRACE( "> TestWeakComponentImpl disposing called... <\n" ); }
217 virtual OUString SAL_CALL
a() throw(RuntimeException
)
218 { return OUString( RTL_CONSTASCII_USTRINGPARAM("a") ); }
220 virtual OUString SAL_CALL
ba() throw(RuntimeException
)
221 { return OUString( RTL_CONSTASCII_USTRINGPARAM("ba") ); }
223 virtual OUString SAL_CALL
ca() throw(RuntimeException
)
224 { return OUString( RTL_CONSTASCII_USTRINGPARAM("ca") ); }
226 virtual OUString SAL_CALL
dba() throw(RuntimeException
)
227 { return OUString( RTL_CONSTASCII_USTRINGPARAM("dba") ); }
229 virtual OUString SAL_CALL
e() throw(RuntimeException
)
230 { return OUString( RTL_CONSTASCII_USTRINGPARAM("e") ); }
232 virtual OUString SAL_CALL
fe() throw(RuntimeException
)
233 { return OUString( RTL_CONSTASCII_USTRINGPARAM("fe") ); }
235 virtual OUString SAL_CALL
g() throw(RuntimeException
)
236 { return OUString( RTL_CONSTASCII_USTRINGPARAM("g") ); }
239 //==================================================================================================
240 struct TestWeakAggComponentImpl
: public WeakAggComponentImplHelper4
< CA
, DBA
, FE
, G
>
243 TestWeakAggComponentImpl()
244 : WeakAggComponentImplHelper4
< CA
, DBA
, FE
, G
>( m
)
246 virtual ~TestWeakAggComponentImpl()
247 { OSL_TRACE( "> TestWeakAggComponentImpl dtor called... <\n" ); }
249 void SAL_CALL
disposing()
250 { OSL_TRACE( "> TestWeakAggComponentImpl disposing called... <\n" ); }
253 virtual OUString SAL_CALL
a() throw(RuntimeException
)
254 { return OUString( RTL_CONSTASCII_USTRINGPARAM("a") ); }
256 virtual OUString SAL_CALL
ba() throw(RuntimeException
)
257 { return OUString( RTL_CONSTASCII_USTRINGPARAM("ba") ); }
259 virtual OUString SAL_CALL
ca() throw(RuntimeException
)
260 { return OUString( RTL_CONSTASCII_USTRINGPARAM("ca") ); }
262 virtual OUString SAL_CALL
dba() throw(RuntimeException
)
263 { return OUString( RTL_CONSTASCII_USTRINGPARAM("dba") ); }
265 virtual OUString SAL_CALL
e() throw(RuntimeException
)
266 { return OUString( RTL_CONSTASCII_USTRINGPARAM("e") ); }
268 virtual OUString SAL_CALL
fe() throw(RuntimeException
)
269 { return OUString( RTL_CONSTASCII_USTRINGPARAM("fe") ); }
271 virtual OUString SAL_CALL
g() throw(RuntimeException
)
272 { return OUString( RTL_CONSTASCII_USTRINGPARAM("g") ); }
275 //==================================================================================================
276 struct TestImplInh
: public ImplInheritanceHelper2
< TestWeakImpl
, H
, I
>
280 explicit TestImplInh(int):
281 ImplInheritanceHelper2
< TestWeakImpl
, H
, I
>(1) {}
283 TestImplInh(int, int):
284 ImplInheritanceHelper2
< TestWeakImpl
, H
, I
>(1, 2) {}
286 TestImplInh(int, int, int):
287 ImplInheritanceHelper2
< TestWeakImpl
, H
, I
>(1, 2, 3) {}
289 TestImplInh(int, int, int, int):
290 ImplInheritanceHelper2
< TestWeakImpl
, H
, I
>(1, 2, 3, 4) {}
292 TestImplInh(int, int, int, int, int):
293 ImplInheritanceHelper2
< TestWeakImpl
, H
, I
>(1, 2, 3, 4, 5) {}
295 TestImplInh(int, int, int, int, int, int):
296 ImplInheritanceHelper2
< TestWeakImpl
, H
, I
>(1, 2, 3, 4, 5, 6) {}
298 virtual ~TestImplInh()
299 { OSL_TRACE( "> TestWeakImplInh dtor called... <\n" ); }
302 virtual OUString SAL_CALL
h() throw(RuntimeException
)
303 { return OUString( RTL_CONSTASCII_USTRINGPARAM("h") ); }
305 virtual OUString SAL_CALL
i() throw(RuntimeException
)
306 { return OUString( RTL_CONSTASCII_USTRINGPARAM("i") ); }
309 //==================================================================================================
310 struct TestAggImplInh
: public AggImplInheritanceHelper2
< TestWeakAggImpl
, H
, I
>
312 virtual ~TestAggImplInh()
313 { OSL_TRACE( "> TestAggImplInh dtor called... <\n" ); }
316 virtual OUString SAL_CALL
h() throw(RuntimeException
)
317 { return OUString( RTL_CONSTASCII_USTRINGPARAM("h2") ); }
319 virtual OUString SAL_CALL
i() throw(RuntimeException
)
320 { return OUString( RTL_CONSTASCII_USTRINGPARAM("i2") ); }
324 static bool isIn( Sequence
< Type
> const & rTypes
, char const * name
)
326 OUString
str( OUString::createFromAscii( name
) );
327 Type
const * pTypes
= rTypes
.getConstArray();
328 for ( sal_Int32 nPos
= rTypes
.getLength(); nPos
--; )
330 if (pTypes
[ nPos
].getTypeName().equals( str
))
336 //==================================================================================================
337 static void dotest( const Reference
< XInterface
> & xOriginal
)
339 Reference
< lang::XTypeProvider
> xTP( xOriginal
, UNO_QUERY
);
340 Sequence
< sal_Int8
> id( xTP
->getImplementationId() );
341 Sequence
< Type
> types( xTP
->getTypes() );
342 ::fprintf( stderr
, "> supported types: " );
344 for ( ; n
< types
.getLength(); ++n
)
346 OString
str( OUStringToOString( types
[ n
].getTypeName(), RTL_TEXTENCODING_ASCII_US
) );
347 ::fprintf( stderr
, (n
< (types
.getLength()-1)) ? "%s, " : "%s; type-id=\n", str
.getStr() );
349 for ( n
= 0; n
< 16; ++n
)
351 ::fprintf( stderr
, n
< 15 ? "%x " : "%x \n", id
[ n
] );
354 Reference
< A
> xa( xOriginal
, UNO_QUERY
);
355 OSL_ENSURE( xa
->a().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("a") ), "### A failed!" );
356 Reference
< BA
> xba( xa
, UNO_QUERY
);
357 OSL_ENSURE( xba
->ba().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("ba") ), "### BA failed!" );
358 OSL_ENSURE( xba
->a().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("a") ), "### BA failed!" );
359 Reference
< CA
> xca( xba
, UNO_QUERY
);
360 OSL_ENSURE( xca
->ca().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("ca") ), "### CA failed!" );
361 OSL_ENSURE( xca
->a().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("a") ), "### CA failed!" );
362 Reference
< DBA
> xdba( xca
, UNO_QUERY
);
363 OSL_ENSURE( xdba
->dba().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("dba") ), "### DBA failed!" );
364 OSL_ENSURE( xdba
->ba().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("ba") ), "### DBA failed!" );
365 OSL_ENSURE( xdba
->a().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("a") ), "### DBA failed!" );
366 Reference
< E
> xe( xdba
, UNO_QUERY
);
367 OSL_ENSURE( xe
->e().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("e") ), "### E failed!" );
368 Reference
< FE
> xfe( xe
, UNO_QUERY
);
369 OSL_ENSURE( xfe
->fe().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("fe") ), "### FE failed!" );
370 Reference
< G
> xg( xfe
, UNO_QUERY
);
371 OSL_ENSURE( xg
->g().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("g") ), "### G failed!" );
372 OSL_ENSURE( xg
->a().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("a") ), "### G failed!" );
375 Reference
< lang::XTypeProvider
> xProv( xg
, UNO_QUERY
);
376 Sequence
< Type
> aTypes( xProv
->getTypes() );
378 // CA, DBA, FE, G, XTypeProvider
379 OSL_ASSERT( isIn( aTypes
, "test.CA" ) );
380 OSL_ASSERT( isIn( aTypes
, "test.DBA" ) );
381 OSL_ASSERT( isIn( aTypes
, "test.FE") );
382 OSL_ASSERT( isIn( aTypes
, "test.G") );
383 OSL_ASSERT( isIn( aTypes
, "com.sun.star.lang.XTypeProvider") );
385 Reference
< XWeak
> xWeak( xg
, UNO_QUERY
);
388 OSL_ASSERT( isIn( aTypes
, "com.sun.star.uno.XWeak") );
390 Reference
< lang::XComponent
> xComp( xg
, UNO_QUERY
);
393 OSL_ASSERT( isIn( aTypes
, "com.sun.star.lang.XComponent") );
396 Reference
< XAggregation
> xAgg( xg
, UNO_QUERY
);
399 OSL_ASSERT( isIn( aTypes
, "com.sun.star.uno.XAggregation") );
401 Reference
< H
> xH( xg
, UNO_QUERY
);
404 OSL_ASSERT( isIn( aTypes
, "test.H") );
406 Reference
< I
> xI( xg
, UNO_QUERY
);
409 OSL_ASSERT( isIn( aTypes
, "test.I") );
412 OSL_ENSURE( xg
== xOriginal
, "### root!" );
421 lang::IllegalAccessException exc
)
434 //==================================================================================================
435 void test_ImplHelper( const Reference
< lang::XMultiServiceFactory
> & /*xSF*/ )
437 Reference
< XInterface
> xImpl( (lang::XTypeProvider
*)new TestImpl() );
438 Reference
< lang::XTypeProvider
> xTP1( xImpl
, UNO_QUERY
);
439 Reference
< XInterface
> xWeakImpl( (OWeakObject
*)new TestWeakImpl() );
440 Reference
< lang::XTypeProvider
> xTP2( xWeakImpl
, UNO_QUERY
);
441 Reference
< XInterface
> xWeakAggImpl( (OWeakObject
*)new TestWeakAggImpl() );
442 Reference
< lang::XTypeProvider
> xTP3( xWeakAggImpl
, UNO_QUERY
);
443 Reference
< XInterface
> xWeakComponentImpl( (OWeakObject
*)new TestWeakComponentImpl() );
444 Reference
< lang::XTypeProvider
> xTP4( xWeakComponentImpl
, UNO_QUERY
);
445 Reference
< XInterface
> xWeakAggComponentImpl( (OWeakObject
*)new TestWeakAggComponentImpl() );
446 Reference
< lang::XTypeProvider
> xTP5( xWeakAggComponentImpl
, UNO_QUERY
);
449 xTP1
->getImplementationId() != xTP2
->getImplementationId() &&
450 xTP1
->getImplementationId() != xTP3
->getImplementationId() &&
451 xTP1
->getImplementationId() != xTP4
->getImplementationId() &&
452 xTP1
->getImplementationId() != xTP5
->getImplementationId() &&
453 xTP2
->getImplementationId() != xTP3
->getImplementationId() &&
454 xTP2
->getImplementationId() != xTP4
->getImplementationId() &&
455 xTP2
->getImplementationId() != xTP5
->getImplementationId() &&
456 xTP3
->getImplementationId() != xTP4
->getImplementationId() &&
457 xTP3
->getImplementationId() != xTP5
->getImplementationId() &&
458 xTP4
->getImplementationId() != xTP5
->getImplementationId() );
463 dotest( xWeakAggImpl
);
464 dotest( xWeakComponentImpl
);
465 dotest( xWeakAggComponentImpl
);
467 xWeakImpl
= (OWeakObject
*)new TestImplInh();
468 Reference
< lang::XTypeProvider
> xTP6( xWeakImpl
, UNO_QUERY
);
470 Reference
< H
> xH( xWeakImpl
, UNO_QUERY
);
471 Reference
< I
> xI( xH
, UNO_QUERY
);
472 OSL_ASSERT( xH
->h().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("h") ) );
473 OSL_ASSERT( xI
->i().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("i") ) );
475 xWeakAggImpl
= (OWeakObject
*)new TestAggImplInh();
476 Reference
< lang::XTypeProvider
> xTP7( xWeakAggImpl
, UNO_QUERY
);
477 dotest( xWeakAggImpl
);
478 xH
.set( xWeakAggImpl
, UNO_QUERY
);
479 xI
.set( xH
, UNO_QUERY
);
480 OSL_ASSERT( xH
->h().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("h2") ) );
481 OSL_ASSERT( xI
->i().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("i2") ) );
485 xTP6
->getImplementationId() != xTP1
->getImplementationId() &&
486 xTP6
->getImplementationId() != xTP2
->getImplementationId() &&
487 xTP6
->getImplementationId() != xTP3
->getImplementationId() &&
488 xTP6
->getImplementationId() != xTP4
->getImplementationId() &&
489 xTP6
->getImplementationId() != xTP5
->getImplementationId() &&
490 xTP6
->getImplementationId() != xTP7
->getImplementationId() &&
491 xTP7
->getImplementationId() != xTP1
->getImplementationId() &&
492 xTP7
->getImplementationId() != xTP2
->getImplementationId() &&
493 xTP7
->getImplementationId() != xTP3
->getImplementationId() &&
494 xTP7
->getImplementationId() != xTP4
->getImplementationId() &&
495 xTP7
->getImplementationId() != xTP5
->getImplementationId() );
498 bool exc_succ
= false;
499 lang::IllegalAccessException
exc(
500 OUString( RTL_CONSTASCII_USTRINGPARAM("testtest") ),
502 // exception helper tests
509 Any
a( getCaughtException() );
510 OSL_ASSERT( a
== exc
);
516 catch (lang::IllegalAccessException
& e
)
518 OSL_ASSERT( exc
.Message
== e
.Message
&& exc
.Context
== e
.Context
);
526 Any
a2( getCaughtException() );
527 OSL_ASSERT( (a2
== a
) && (a2
== exc
) );
533 catch (lang::IllegalAccessException
&)
535 Any
a3( getCaughtException() );
536 OSL_ASSERT( (a3
== a
) && (a3
== a2
) && (a3
== exc
) );
542 OSL_ASSERT( exc_succ
);
546 throwException( makeAny( RuntimeException(
547 OUString( RTL_CONSTASCII_USTRINGPARAM("runtime exc") ), xImpl
) ) );
549 catch (RuntimeException
& rExc
)
551 OSL_ENSURE( rExc
.Message
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("runtime exc") ) && rExc
.Context
== xImpl
,
552 "### unexpected exception content!" );
555 throwException( makeAny( Exception(
556 OUString( RTL_CONSTASCII_USTRINGPARAM("exc") ), rExc
.Context
) ) );
558 catch (lang::IllegalAccessException
&)
560 OSL_ENSURE( sal_False
, "### unexpected IllegalAccessException exception caught!" );
562 catch (Exception
& rExc2
)
564 OSL_ENSURE( rExc2
.Message
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("exc") ) && rExc2
.Context
== xImpl
,
565 "### unexpected exception content!" );
568 throwException( makeAny( lang::IllegalAccessException(
569 OUString( RTL_CONSTASCII_USTRINGPARAM("axxess exc") ), rExc2
.Context
) ) );
571 catch (lang::IllegalAccessException
& rExc3
)
573 OSL_ENSURE( rExc3
.Message
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("axxess exc") ) && rExc3
.Context
== xImpl
,
574 "### unexpected exception content!" );
582 OSL_ENSURE( sal_False
, "### exception test failed!" );