1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <sal/types.h>
22 #include <cppunit/TestSuite.h>
23 #include <cppunit/TestFixture.h>
24 #include <cppunit/TestCase.h>
25 #include <cppunit/plugin/TestPlugIn.h>
26 #include <cppunit/extensions/HelperMacros.h>
30 #include "com/sun/star/beans/Optional.hpp"
31 #include "com/sun/star/beans/PropertyChangeEvent.hpp"
32 #include "com/sun/star/lang/EventObject.hpp"
33 #include "com/sun/star/uno/Exception.hpp"
34 #include "com/sun/star/uno/Reference.hxx"
35 #include "com/sun/star/uno/RuntimeException.hpp"
36 #include "com/sun/star/uno/Sequence.hxx"
37 #include "com/sun/star/uno/Type.hxx"
38 #include "com/sun/star/uno/TypeClass.hpp"
39 #include "com/sun/star/uno/XComponentContext.hpp"
40 #include "com/sun/star/uno/XInterface.hpp"
41 #include "cppu/unotype.hxx"
42 #include "rtl/ustring.hxx"
44 namespace com
{ namespace sun
{ namespace star
{ namespace uno
{
50 struct DerivedStruct1
: css::lang::EventObject
{};
52 struct DerivedStruct2
: css::beans::PropertyChangeEvent
{};
54 struct DerivedException1
: css::uno::Exception
{};
56 struct DerivedException2
: css::uno::RuntimeException
{};
58 struct DerivedInterface1
: css::uno::XInterface
{
60 ~DerivedInterface1() {}
61 // avoid warnings about virtual members and non-virtual dtor
64 static void dummy(DerivedInterface1
* p
) { p
->~DerivedInterface1(); }
65 // ...and avoid warnings about unused ~DerivedInterface1 (see below)
68 struct DerivedInterface2
: css::uno::XComponentContext
{
70 ~DerivedInterface2() {}
71 // avoid warnings about virtual members and non-virtual dtor
74 static void dummy(DerivedInterface2
* p
) { p
->~DerivedInterface2(); }
75 // ...and avoid warnings about unused ~DerivedInterface2 (see below)
78 class Test
: public ::CppUnit::TestFixture
{
82 void testGetTypeFavourUnsigned();
84 void testGetTypeFavourChar();
86 CPPUNIT_TEST_SUITE(Test
);
87 CPPUNIT_TEST(testUnoType
);
88 CPPUNIT_TEST(testGetTypeFavourUnsigned
);
89 CPPUNIT_TEST(testGetTypeFavourChar
);
90 CPPUNIT_TEST_SUITE_END();
93 void Test::testUnoType() {
94 // Avoid warnings about unused ~DerivedInterface1/2 (see above):
96 DerivedInterface1::dummy(0);
97 DerivedInterface2::dummy(0);
101 t
= ::cppu::UnoType
< ::cppu::UnoVoidType
>::get();
102 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_VOID
, +t
.getTypeClass());
103 CPPUNIT_ASSERT_EQUAL(
104 ::rtl::OUString("void"), t
.getTypeName());
105 CPPUNIT_ASSERT(cppu::UnoType
<void>::get() == t
);
106 t
= ::cppu::UnoType
< bool >::get();
107 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_BOOLEAN
, +t
.getTypeClass());
108 CPPUNIT_ASSERT_EQUAL(
109 ::rtl::OUString("boolean"),
111 CPPUNIT_ASSERT(::cppu::UnoType
< sal_Bool
>::get() == t
);
112 t
= ::cppu::UnoType
< ::sal_Int8
>::get();
113 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_BYTE
, +t
.getTypeClass());
114 CPPUNIT_ASSERT_EQUAL(
115 ::rtl::OUString("byte"), t
.getTypeName());
116 t
= ::cppu::UnoType
< ::sal_Int16
>::get();
117 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SHORT
, +t
.getTypeClass());
118 CPPUNIT_ASSERT_EQUAL(
119 ::rtl::OUString("short"), t
.getTypeName());
120 t
= ::cppu::UnoType
< ::cppu::UnoUnsignedShortType
>::get();
121 CPPUNIT_ASSERT_EQUAL(
122 +css::uno::TypeClass_UNSIGNED_SHORT
, +t
.getTypeClass());
123 CPPUNIT_ASSERT_EQUAL(
124 ::rtl::OUString("unsigned short"),
126 t
= ::cppu::UnoType
< ::sal_Int32
>::get();
127 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_LONG
, +t
.getTypeClass());
128 CPPUNIT_ASSERT_EQUAL(
129 ::rtl::OUString("long"), t
.getTypeName());
130 t
= ::cppu::UnoType
< ::sal_uInt32
>::get();
131 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_UNSIGNED_LONG
, +t
.getTypeClass());
132 CPPUNIT_ASSERT_EQUAL(
133 ::rtl::OUString("unsigned long"),
135 t
= ::cppu::UnoType
< ::sal_Int64
>::get();
136 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_HYPER
, +t
.getTypeClass());
137 CPPUNIT_ASSERT_EQUAL(
138 ::rtl::OUString("hyper"), t
.getTypeName());
139 t
= ::cppu::UnoType
< ::sal_uInt64
>::get();
140 CPPUNIT_ASSERT_EQUAL(
141 +css::uno::TypeClass_UNSIGNED_HYPER
, +t
.getTypeClass());
142 CPPUNIT_ASSERT_EQUAL(
143 ::rtl::OUString("unsigned hyper"),
145 t
= ::cppu::UnoType
< float >::get();
146 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_FLOAT
, +t
.getTypeClass());
147 CPPUNIT_ASSERT_EQUAL(
148 ::rtl::OUString("float"), t
.getTypeName());
149 t
= ::cppu::UnoType
< double >::get();
150 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_DOUBLE
, +t
.getTypeClass());
151 CPPUNIT_ASSERT_EQUAL(
152 ::rtl::OUString("double"),
154 t
= ::cppu::UnoType
< ::cppu::UnoCharType
>::get();
155 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_CHAR
, +t
.getTypeClass());
156 CPPUNIT_ASSERT_EQUAL(
157 ::rtl::OUString("char"), t
.getTypeName());
158 t
= ::cppu::UnoType
< ::rtl::OUString
>::get();
159 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_STRING
, +t
.getTypeClass());
160 CPPUNIT_ASSERT_EQUAL(
161 ::rtl::OUString("string"),
163 t
= ::cppu::UnoType
< css::uno::Type
>::get();
164 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_TYPE
, +t
.getTypeClass());
165 CPPUNIT_ASSERT_EQUAL(
166 ::rtl::OUString("type"), t
.getTypeName());
167 t
= ::cppu::UnoType
< css::uno::Any
>::get();
168 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_ANY
, +t
.getTypeClass());
169 CPPUNIT_ASSERT_EQUAL(
170 ::rtl::OUString("any"), t
.getTypeName());
171 t
= ::cppu::UnoType
< ::cppu::UnoSequenceType
< ::sal_Int8
> >::get();
172 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SEQUENCE
, +t
.getTypeClass());
173 CPPUNIT_ASSERT_EQUAL(
174 ::rtl::OUString("[]byte"),
177 ::cppu::UnoType
< css::uno::Sequence
< ::sal_Int8
> >::get() == t
);
179 ::cppu::UnoSequenceType
< ::cppu::UnoUnsignedShortType
> >::get();
180 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SEQUENCE
, +t
.getTypeClass());
181 CPPUNIT_ASSERT_EQUAL(
182 ::rtl::OUString("[]unsigned short"),
185 ::cppu::UnoSequenceType
< ::cppu::UnoCharType
> >::get();
186 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SEQUENCE
, +t
.getTypeClass());
187 CPPUNIT_ASSERT_EQUAL(
188 ::rtl::OUString("[]char"),
190 t
= ::cppu::UnoType
< ::cppu::UnoSequenceType
< ::cppu::UnoSequenceType
<
191 ::sal_Int8
> > >::get();
192 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SEQUENCE
, +t
.getTypeClass());
193 CPPUNIT_ASSERT_EQUAL(
194 ::rtl::OUString("[][]byte"),
198 css::uno::Sequence
< css::uno::Sequence
< ::sal_Int8
> > >::get() == t
);
199 t
= ::cppu::UnoType
< ::cppu::UnoSequenceType
< ::cppu::UnoSequenceType
<
200 ::cppu::UnoUnsignedShortType
> > >::get();
201 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SEQUENCE
, +t
.getTypeClass());
202 CPPUNIT_ASSERT_EQUAL(
203 ::rtl::OUString("[][]unsigned short"),
205 t
= ::cppu::UnoType
< ::cppu::UnoSequenceType
< ::cppu::UnoSequenceType
<
206 ::cppu::UnoCharType
> > >::get();
207 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SEQUENCE
, +t
.getTypeClass());
208 CPPUNIT_ASSERT_EQUAL(
209 ::rtl::OUString("[][]char"),
211 t
= ::cppu::UnoType
< css::uno::TypeClass
>::get();
212 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_ENUM
, +t
.getTypeClass());
213 CPPUNIT_ASSERT_EQUAL(
214 ::rtl::OUString("com.sun.star.uno.TypeClass"),
216 t
= ::cppu::UnoType
< css::lang::EventObject
>::get();
217 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_STRUCT
, +t
.getTypeClass());
218 CPPUNIT_ASSERT_EQUAL(
219 ::rtl::OUString("com.sun.star.lang.EventObject"),
221 CPPUNIT_ASSERT(::cppu::UnoType
< DerivedStruct1
>::get() == t
);
222 t
= ::cppu::UnoType
< css::beans::PropertyChangeEvent
>::get();
223 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_STRUCT
, +t
.getTypeClass());
224 CPPUNIT_ASSERT_EQUAL(
226 "com.sun.star.beans.PropertyChangeEvent"),
228 CPPUNIT_ASSERT(::cppu::UnoType
< DerivedStruct2
>::get() == t
);
229 t
= ::cppu::UnoType
< css::beans::Optional
< ::sal_Int8
> >::get();
230 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_STRUCT
, +t
.getTypeClass());
231 CPPUNIT_ASSERT_EQUAL(
232 ::rtl::OUString("com.sun.star.beans.Optional<byte>"),
234 t
= ::cppu::UnoType
< css::uno::Exception
>::get();
235 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_EXCEPTION
, +t
.getTypeClass());
236 CPPUNIT_ASSERT_EQUAL(
237 ::rtl::OUString("com.sun.star.uno.Exception"),
239 CPPUNIT_ASSERT(::cppu::UnoType
< DerivedException1
>::get() == t
);
240 t
= ::cppu::UnoType
< css::uno::RuntimeException
>::get();
241 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_EXCEPTION
, +t
.getTypeClass());
242 CPPUNIT_ASSERT_EQUAL(
243 ::rtl::OUString("com.sun.star.uno.RuntimeException"),
245 CPPUNIT_ASSERT(::cppu::UnoType
< DerivedException2
>::get() == t
);
246 t
= ::cppu::UnoType
< css::uno::XInterface
>::get();
247 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_INTERFACE
, +t
.getTypeClass());
248 CPPUNIT_ASSERT_EQUAL(
249 ::rtl::OUString("com.sun.star.uno.XInterface"),
252 ::cppu::UnoType
< css::uno::Reference
< css::uno::XInterface
> >::get() ==
254 CPPUNIT_ASSERT(::cppu::UnoType
< DerivedInterface1
>::get() == t
);
256 ::cppu::UnoType
< css::uno::Reference
< DerivedInterface1
> >::get() ==
258 t
= ::cppu::UnoType
< css::uno::XComponentContext
>::get();
259 CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_INTERFACE
, +t
.getTypeClass());
260 CPPUNIT_ASSERT_EQUAL(
261 ::rtl::OUString("com.sun.star.uno.XComponentContext"),
265 css::uno::Reference
< css::uno::XComponentContext
> >::get() == t
);
266 CPPUNIT_ASSERT(::cppu::UnoType
< DerivedInterface2
>::get() == t
);
268 ::cppu::UnoType
< css::uno::Reference
< DerivedInterface2
> >::get() ==
272 void Test::testGetTypeFavourUnsigned() {
273 CPPUNIT_ASSERT(typeid(::sal_Unicode
) == typeid(::sal_uInt16
));
275 // ::getCppuType(static_cast< ::sal_Unicode * >(0)) ==
276 // ::getCppuType(static_cast< ::sal_uInt16 * >(0)));
278 ::cppu::getTypeFavourUnsigned(
279 static_cast< ::cppu::UnoVoidType
* >(0)) ==
280 ::cppu::UnoType
< ::cppu::UnoVoidType
>::get());
282 ::cppu::getTypeFavourUnsigned(static_cast< bool * >(0)) ==
283 ::cppu::UnoType
< bool >::get());
285 ::cppu::getTypeFavourUnsigned(static_cast< sal_Bool
* >(0)) ==
286 ::cppu::UnoType
< bool >::get());
288 ::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int8
* >(0)) ==
289 ::cppu::UnoType
< ::sal_Int8
>::get());
291 ::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int16
* >(0)) ==
292 ::cppu::UnoType
< ::sal_Int16
>::get());
294 ::cppu::getTypeFavourUnsigned(
295 static_cast< ::cppu::UnoUnsignedShortType
* >(0)) ==
296 ::cppu::UnoType
< ::cppu::UnoUnsignedShortType
>::get());
298 ::cppu::getTypeFavourUnsigned(static_cast< ::sal_uInt16
* >(0)) ==
299 ::cppu::UnoType
< ::cppu::UnoUnsignedShortType
>::get());
301 ::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int32
* >(0)) ==
302 ::cppu::UnoType
< ::sal_Int32
>::get());
304 ::cppu::getTypeFavourUnsigned(static_cast< ::sal_uInt32
* >(0)) ==
305 ::cppu::UnoType
< ::sal_uInt32
>::get());
307 ::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int64
* >(0)) ==
308 ::cppu::UnoType
< ::sal_Int64
>::get());
310 ::cppu::getTypeFavourUnsigned(static_cast< ::sal_uInt64
* >(0)) ==
311 ::cppu::UnoType
< ::sal_uInt64
>::get());
313 ::cppu::getTypeFavourUnsigned(static_cast< float * >(0)) ==
314 ::cppu::UnoType
< float >::get());
316 ::cppu::getTypeFavourUnsigned(static_cast< double * >(0)) ==
317 ::cppu::UnoType
< double >::get());
319 ::cppu::getTypeFavourUnsigned(
320 static_cast< ::cppu::UnoCharType
* >(0)) ==
321 ::cppu::UnoType
< ::cppu::UnoCharType
>::get());
323 ::cppu::getTypeFavourUnsigned(static_cast< ::sal_Unicode
* >(0)) ==
324 ::cppu::UnoType
< ::cppu::UnoUnsignedShortType
>::get());
326 ::cppu::getTypeFavourUnsigned(static_cast< ::rtl::OUString
* >(0)) ==
327 ::cppu::UnoType
< ::rtl::OUString
>::get());
329 ::cppu::getTypeFavourUnsigned(static_cast< css::uno::Type
* >(0)) ==
330 ::cppu::UnoType
< css::uno::Type
>::get());
332 ::cppu::getTypeFavourUnsigned(static_cast< css::uno::Any
* >(0)) ==
333 ::cppu::UnoType
< css::uno::Any
>::get());
335 ::cppu::getTypeFavourUnsigned(
337 ::cppu::UnoSequenceType
< ::cppu::UnoUnsignedShortType
> * >(0)) ==
339 ::cppu::UnoSequenceType
< ::cppu::UnoUnsignedShortType
> >::get());
341 ::cppu::getTypeFavourUnsigned(
342 static_cast< css::uno::Sequence
< ::sal_uInt16
> * >(0)) ==
344 ::cppu::UnoSequenceType
< ::cppu::UnoUnsignedShortType
> >::get());
346 ::cppu::getTypeFavourUnsigned(
347 static_cast< ::cppu::UnoSequenceType
< ::cppu::UnoSequenceType
<
348 ::cppu::UnoUnsignedShortType
> > * >(0)) ==
349 ::cppu::UnoType
< ::cppu::UnoSequenceType
< ::cppu::UnoSequenceType
<
350 ::cppu::UnoUnsignedShortType
> > >::get());
352 ::cppu::getTypeFavourUnsigned(
353 static_cast< css::uno::Sequence
< css::uno::Sequence
<
354 ::sal_uInt16
> > * >(0)) ==
355 ::cppu::UnoType
< ::cppu::UnoSequenceType
< ::cppu::UnoSequenceType
<
356 ::cppu::UnoUnsignedShortType
> > >::get());
358 ::cppu::getTypeFavourUnsigned(
359 static_cast< css::uno::Sequence
< ::sal_Unicode
> * >(0)) ==
361 ::cppu::UnoSequenceType
< ::cppu::UnoUnsignedShortType
> >::get());
363 ::cppu::getTypeFavourUnsigned(
364 static_cast< css::uno::Sequence
< css::uno::Sequence
<
365 ::sal_Unicode
> > * >(0)) ==
366 ::cppu::UnoType
< ::cppu::UnoSequenceType
< ::cppu::UnoSequenceType
<
367 ::cppu::UnoUnsignedShortType
> > >::get());
369 ::cppu::getTypeFavourUnsigned(
370 static_cast< css::uno::TypeClass
* >(0)) ==
371 ::cppu::UnoType
< css::uno::TypeClass
>::get());
373 ::cppu::getTypeFavourUnsigned(
374 static_cast< css::lang::EventObject
* >(0)) ==
375 ::cppu::UnoType
< css::lang::EventObject
>::get());
377 ::cppu::getTypeFavourUnsigned(static_cast< DerivedStruct1
* >(0)) ==
378 ::cppu::UnoType
< css::lang::EventObject
>::get());
380 ::cppu::getTypeFavourUnsigned(
381 static_cast< css::beans::PropertyChangeEvent
* >(0)) ==
382 ::cppu::UnoType
< css::beans::PropertyChangeEvent
>::get());
384 ::cppu::getTypeFavourUnsigned(static_cast< DerivedStruct2
* >(0)) ==
385 ::cppu::UnoType
< css::beans::PropertyChangeEvent
>::get());
387 ::cppu::getTypeFavourUnsigned(
388 static_cast< css::beans::Optional
< ::sal_Int8
> * >(0)) ==
389 ::cppu::UnoType
< css::beans::Optional
< ::sal_Int8
> >::get());
391 ::cppu::getTypeFavourUnsigned(
392 static_cast< css::uno::Exception
* >(0)) ==
393 ::cppu::UnoType
< css::uno::Exception
>::get());
395 ::cppu::getTypeFavourUnsigned(static_cast< DerivedException1
* >(0)) ==
396 ::cppu::UnoType
< css::uno::Exception
>::get());
398 ::cppu::getTypeFavourUnsigned(
399 static_cast< css::uno::RuntimeException
* >(0)) ==
400 ::cppu::UnoType
< css::uno::RuntimeException
>::get());
402 ::cppu::getTypeFavourUnsigned(static_cast< DerivedException2
* >(0)) ==
403 ::cppu::UnoType
< css::uno::RuntimeException
>::get());
405 ::cppu::getTypeFavourUnsigned(
406 static_cast< css::uno::XInterface
* >(0)) ==
407 ::cppu::UnoType
< css::uno::XInterface
>::get());
409 ::cppu::getTypeFavourUnsigned(
410 static_cast< css::uno::Reference
< css::uno::XInterface
> * >(0)) ==
411 ::cppu::UnoType
< css::uno::XInterface
>::get());
413 ::cppu::getTypeFavourUnsigned(static_cast< DerivedInterface1
* >(0)) ==
414 ::cppu::UnoType
< css::uno::XInterface
>::get());
416 ::cppu::getTypeFavourUnsigned(
417 static_cast< css::uno::Reference
< DerivedInterface1
> * >(0)) ==
418 ::cppu::UnoType
< css::uno::XInterface
>::get());
420 ::cppu::getTypeFavourUnsigned(
421 static_cast< css::uno::XComponentContext
* >(0)) ==
422 ::cppu::UnoType
< css::uno::XComponentContext
>::get());
424 ::cppu::getTypeFavourUnsigned(
426 css::uno::Reference
< css::uno::XComponentContext
> * >(0)) ==
427 ::cppu::UnoType
< css::uno::XComponentContext
>::get());
429 ::cppu::getTypeFavourUnsigned(static_cast< DerivedInterface2
* >(0)) ==
430 ::cppu::UnoType
< css::uno::XComponentContext
>::get());
432 ::cppu::getTypeFavourUnsigned(
433 static_cast< css::uno::Reference
< DerivedInterface2
> * >(0)) ==
434 ::cppu::UnoType
< css::uno::XComponentContext
>::get());
437 void Test::testGetTypeFavourChar() {
438 CPPUNIT_ASSERT(typeid(::sal_Unicode
) == typeid(::sal_uInt16
));
440 // ::getCppuType< ::sal_Unicode >() == ::getCppuType< ::sal_uInt16 >());
442 ::cppu::getTypeFavourChar(static_cast< ::cppu::UnoVoidType
* >(0)) ==
443 ::cppu::UnoType
< ::cppu::UnoVoidType
>::get());
445 ::cppu::getTypeFavourChar(static_cast< bool * >(0)) ==
446 ::cppu::UnoType
< bool >::get());
448 ::cppu::getTypeFavourChar(static_cast< sal_Bool
* >(0)) ==
449 ::cppu::UnoType
< bool >::get());
451 ::cppu::getTypeFavourChar(static_cast< ::sal_Int8
* >(0)) ==
452 ::cppu::UnoType
< ::sal_Int8
>::get());
454 ::cppu::getTypeFavourChar(static_cast< ::sal_Int16
* >(0)) ==
455 ::cppu::UnoType
< ::sal_Int16
>::get());
457 ::cppu::getTypeFavourChar(
458 static_cast< ::cppu::UnoUnsignedShortType
* >(0)) ==
459 ::cppu::UnoType
< ::cppu::UnoUnsignedShortType
>::get());
461 ::cppu::getTypeFavourChar(static_cast< ::sal_uInt16
* >(0)) ==
462 ::cppu::UnoType
< ::cppu::UnoCharType
>::get());
464 ::cppu::getTypeFavourChar(static_cast< ::sal_Int32
* >(0)) ==
465 ::cppu::UnoType
< ::sal_Int32
>::get());
467 ::cppu::getTypeFavourChar(static_cast< ::sal_uInt32
* >(0)) ==
468 ::cppu::UnoType
< ::sal_uInt32
>::get());
470 ::cppu::getTypeFavourChar(static_cast< ::sal_Int64
* >(0)) ==
471 ::cppu::UnoType
< ::sal_Int64
>::get());
473 ::cppu::getTypeFavourChar(static_cast< ::sal_uInt64
* >(0)) ==
474 ::cppu::UnoType
< ::sal_uInt64
>::get());
476 ::cppu::getTypeFavourChar(static_cast< float * >(0)) ==
477 ::cppu::UnoType
< float >::get());
479 ::cppu::getTypeFavourChar(static_cast< double * >(0)) ==
480 ::cppu::UnoType
< double >::get());
482 ::cppu::getTypeFavourChar(static_cast< ::cppu::UnoCharType
* >(0)) ==
483 ::cppu::UnoType
< ::cppu::UnoCharType
>::get());
485 ::cppu::getTypeFavourChar(static_cast< ::sal_Unicode
* >(0)) ==
486 ::cppu::UnoType
< ::cppu::UnoCharType
>::get());
488 ::cppu::getTypeFavourChar(static_cast< ::rtl::OUString
* >(0)) ==
489 ::cppu::UnoType
< ::rtl::OUString
>::get());
491 ::cppu::getTypeFavourChar(static_cast< css::uno::Type
* >(0)) ==
492 ::cppu::UnoType
< css::uno::Type
>::get());
494 ::cppu::getTypeFavourChar(static_cast< css::uno::Any
* >(0)) ==
495 ::cppu::UnoType
< css::uno::Any
>::get());
497 ::cppu::getTypeFavourChar(
499 ::cppu::UnoSequenceType
< ::cppu::UnoUnsignedShortType
> * >(0)) ==
501 ::cppu::UnoSequenceType
< ::cppu::UnoUnsignedShortType
> >::get());
503 ::cppu::getTypeFavourChar(
504 static_cast< css::uno::Sequence
< ::sal_uInt16
> * >(0)) ==
506 ::cppu::UnoSequenceType
< ::cppu::UnoCharType
> >::get());
508 ::cppu::getTypeFavourChar(
509 static_cast< ::cppu::UnoSequenceType
< ::cppu::UnoSequenceType
<
510 ::cppu::UnoUnsignedShortType
> > * >(0)) ==
511 ::cppu::UnoType
< ::cppu::UnoSequenceType
< ::cppu::UnoSequenceType
<
512 ::cppu::UnoUnsignedShortType
> > >::get());
514 ::cppu::getTypeFavourChar(
515 static_cast< css::uno::Sequence
< css::uno::Sequence
<
516 ::sal_uInt16
> > * >(0)) ==
517 ::cppu::UnoType
< ::cppu::UnoSequenceType
< ::cppu::UnoSequenceType
<
518 ::cppu::UnoCharType
> > >::get());
520 ::cppu::getTypeFavourChar(
521 static_cast< css::uno::Sequence
< ::sal_Unicode
> * >(0)) ==
523 ::cppu::UnoSequenceType
< ::cppu::UnoCharType
> >::get());
525 ::cppu::getTypeFavourChar(
526 static_cast< css::uno::Sequence
< css::uno::Sequence
<
527 ::sal_Unicode
> > * >(0)) ==
528 ::cppu::UnoType
< ::cppu::UnoSequenceType
< ::cppu::UnoSequenceType
<
529 ::cppu::UnoCharType
> > >::get());
531 ::cppu::getTypeFavourChar(static_cast< css::uno::TypeClass
* >(0)) ==
532 ::cppu::UnoType
< css::uno::TypeClass
>::get());
534 ::cppu::getTypeFavourChar(
535 static_cast< css::lang::EventObject
* >(0)) ==
536 ::cppu::UnoType
< css::lang::EventObject
>::get());
538 ::cppu::getTypeFavourChar(static_cast< DerivedStruct1
* >(0)) ==
539 ::cppu::UnoType
< css::lang::EventObject
>::get());
541 ::cppu::getTypeFavourChar(
542 static_cast< css::beans::PropertyChangeEvent
* >(0)) ==
543 ::cppu::UnoType
< css::beans::PropertyChangeEvent
>::get());
545 ::cppu::getTypeFavourChar(static_cast< DerivedStruct2
* >(0)) ==
546 ::cppu::UnoType
< css::beans::PropertyChangeEvent
>::get());
548 ::cppu::getTypeFavourChar(
549 static_cast< css::beans::Optional
< ::sal_Int8
> * >(0)) ==
550 ::cppu::UnoType
< css::beans::Optional
< ::sal_Int8
> >::get());
552 ::cppu::getTypeFavourChar(static_cast< css::uno::Exception
* >(0)) ==
553 ::cppu::UnoType
< css::uno::Exception
>::get());
555 ::cppu::getTypeFavourChar(static_cast< DerivedException1
* >(0)) ==
556 ::cppu::UnoType
< css::uno::Exception
>::get());
558 ::cppu::getTypeFavourChar(
559 static_cast< css::uno::RuntimeException
* >(0)) ==
560 ::cppu::UnoType
< css::uno::RuntimeException
>::get());
562 ::cppu::getTypeFavourChar(static_cast< DerivedException2
* >(0)) ==
563 ::cppu::UnoType
< css::uno::RuntimeException
>::get());
565 ::cppu::getTypeFavourChar(
566 static_cast< css::uno::XInterface
* >(0)) ==
567 ::cppu::UnoType
< css::uno::XInterface
>::get());
569 ::cppu::getTypeFavourChar(
570 static_cast< css::uno::Reference
< css::uno::XInterface
> * >(0)) ==
571 ::cppu::UnoType
< css::uno::XInterface
>::get());
573 ::cppu::getTypeFavourChar(static_cast< DerivedInterface1
* >(0)) ==
574 ::cppu::UnoType
< css::uno::XInterface
>::get());
576 ::cppu::getTypeFavourChar(
577 static_cast< css::uno::Reference
< DerivedInterface1
> * >(0)) ==
578 ::cppu::UnoType
< css::uno::XInterface
>::get());
580 ::cppu::getTypeFavourChar(
581 static_cast< css::uno::XComponentContext
* >(0)) ==
582 ::cppu::UnoType
< css::uno::XComponentContext
>::get());
584 ::cppu::getTypeFavourChar(
586 css::uno::Reference
< css::uno::XComponentContext
> * >(0)) ==
587 ::cppu::UnoType
< css::uno::XComponentContext
>::get());
589 ::cppu::getTypeFavourChar(static_cast< DerivedInterface2
* >(0)) ==
590 ::cppu::UnoType
< css::uno::XComponentContext
>::get());
592 ::cppu::getTypeFavourChar(
593 static_cast< css::uno::Reference
< DerivedInterface2
> * >(0)) ==
594 ::cppu::UnoType
< css::uno::XComponentContext
>::get());
597 CPPUNIT_TEST_SUITE_REGISTRATION(Test
);
601 CPPUNIT_PLUGIN_IMPLEMENT();
603 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */