Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #include <sal/types.h>
21 :
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>
27 :
28 : #include <typeinfo>
29 :
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"
43 :
44 : namespace com { namespace sun { namespace star { namespace uno {
45 : class Any;
46 : } } } }
47 :
48 : namespace {
49 :
50 : struct DerivedStruct1: css::lang::EventObject {};
51 :
52 : struct DerivedStruct2: css::beans::PropertyChangeEvent {};
53 :
54 : struct DerivedException1: css::uno::Exception {};
55 :
56 : struct DerivedException2: css::uno::RuntimeException {};
57 :
58 : struct DerivedInterface1: css::uno::XInterface {
59 : private:
60 : ~DerivedInterface1() {}
61 : // avoid warnings about virtual members and non-virtual dtor
62 :
63 : public:
64 : static void dummy(DerivedInterface1 * p) { p->~DerivedInterface1(); }
65 : // ...and avoid warnings about unused ~DerivedInterface1 (see below)
66 : };
67 :
68 : struct DerivedInterface2: css::uno::XComponentContext {
69 : private:
70 : ~DerivedInterface2() {}
71 : // avoid warnings about virtual members and non-virtual dtor
72 :
73 : public:
74 : static void dummy(DerivedInterface2 * p) { p->~DerivedInterface2(); }
75 : // ...and avoid warnings about unused ~DerivedInterface2 (see below)
76 : };
77 :
78 18 : class Test: public ::CppUnit::TestFixture {
79 : public:
80 : void testUnoType();
81 :
82 : void testGetTypeFavourUnsigned();
83 :
84 : void testGetTypeFavourChar();
85 :
86 4 : CPPUNIT_TEST_SUITE(Test);
87 2 : CPPUNIT_TEST(testUnoType);
88 2 : CPPUNIT_TEST(testGetTypeFavourUnsigned);
89 2 : CPPUNIT_TEST(testGetTypeFavourChar);
90 4 : CPPUNIT_TEST_SUITE_END();
91 : };
92 :
93 2 : void Test::testUnoType() {
94 : // Avoid warnings about unused ~DerivedInterface1/2 (see above):
95 : if (false) {
96 : DerivedInterface1::dummy(0);
97 : DerivedInterface2::dummy(0);
98 : }
99 :
100 2 : css::uno::Type t;
101 2 : t = ::cppu::UnoType< ::cppu::UnoVoidType >::get();
102 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_VOID, +t.getTypeClass());
103 4 : CPPUNIT_ASSERT_EQUAL(
104 2 : ::rtl::OUString("void"), t.getTypeName());
105 2 : t = ::cppu::UnoType< bool >::get();
106 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_BOOLEAN, +t.getTypeClass());
107 4 : CPPUNIT_ASSERT_EQUAL(
108 : ::rtl::OUString("boolean"),
109 2 : t.getTypeName());
110 2 : CPPUNIT_ASSERT(::cppu::UnoType< sal_Bool >::get() == t);
111 2 : t = ::cppu::UnoType< ::sal_Int8 >::get();
112 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_BYTE, +t.getTypeClass());
113 4 : CPPUNIT_ASSERT_EQUAL(
114 2 : ::rtl::OUString("byte"), t.getTypeName());
115 2 : t = ::cppu::UnoType< ::sal_Int16 >::get();
116 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SHORT, +t.getTypeClass());
117 4 : CPPUNIT_ASSERT_EQUAL(
118 2 : ::rtl::OUString("short"), t.getTypeName());
119 2 : t = ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get();
120 4 : CPPUNIT_ASSERT_EQUAL(
121 2 : +css::uno::TypeClass_UNSIGNED_SHORT, +t.getTypeClass());
122 4 : CPPUNIT_ASSERT_EQUAL(
123 : ::rtl::OUString("unsigned short"),
124 2 : t.getTypeName());
125 2 : t = ::cppu::UnoType< ::sal_Int32 >::get();
126 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_LONG, +t.getTypeClass());
127 4 : CPPUNIT_ASSERT_EQUAL(
128 2 : ::rtl::OUString("long"), t.getTypeName());
129 2 : t = ::cppu::UnoType< ::sal_uInt32 >::get();
130 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_UNSIGNED_LONG, +t.getTypeClass());
131 4 : CPPUNIT_ASSERT_EQUAL(
132 : ::rtl::OUString("unsigned long"),
133 2 : t.getTypeName());
134 2 : t = ::cppu::UnoType< ::sal_Int64 >::get();
135 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_HYPER, +t.getTypeClass());
136 4 : CPPUNIT_ASSERT_EQUAL(
137 2 : ::rtl::OUString("hyper"), t.getTypeName());
138 2 : t = ::cppu::UnoType< ::sal_uInt64 >::get();
139 4 : CPPUNIT_ASSERT_EQUAL(
140 2 : +css::uno::TypeClass_UNSIGNED_HYPER, +t.getTypeClass());
141 4 : CPPUNIT_ASSERT_EQUAL(
142 : ::rtl::OUString("unsigned hyper"),
143 2 : t.getTypeName());
144 2 : t = ::cppu::UnoType< float >::get();
145 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_FLOAT, +t.getTypeClass());
146 4 : CPPUNIT_ASSERT_EQUAL(
147 2 : ::rtl::OUString("float"), t.getTypeName());
148 2 : t = ::cppu::UnoType< double >::get();
149 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_DOUBLE, +t.getTypeClass());
150 4 : CPPUNIT_ASSERT_EQUAL(
151 : ::rtl::OUString("double"),
152 2 : t.getTypeName());
153 2 : t = ::cppu::UnoType< ::cppu::UnoCharType >::get();
154 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_CHAR, +t.getTypeClass());
155 4 : CPPUNIT_ASSERT_EQUAL(
156 2 : ::rtl::OUString("char"), t.getTypeName());
157 2 : t = ::cppu::UnoType< ::rtl::OUString >::get();
158 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_STRING, +t.getTypeClass());
159 4 : CPPUNIT_ASSERT_EQUAL(
160 : ::rtl::OUString("string"),
161 2 : t.getTypeName());
162 2 : t = ::cppu::UnoType< css::uno::Type >::get();
163 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_TYPE, +t.getTypeClass());
164 4 : CPPUNIT_ASSERT_EQUAL(
165 2 : ::rtl::OUString("type"), t.getTypeName());
166 2 : t = ::cppu::UnoType< css::uno::Any >::get();
167 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_ANY, +t.getTypeClass());
168 4 : CPPUNIT_ASSERT_EQUAL(
169 2 : ::rtl::OUString("any"), t.getTypeName());
170 2 : t = ::cppu::UnoType< ::cppu::UnoSequenceType< ::sal_Int8 > >::get();
171 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SEQUENCE, +t.getTypeClass());
172 4 : CPPUNIT_ASSERT_EQUAL(
173 : ::rtl::OUString("[]byte"),
174 2 : t.getTypeName());
175 4 : CPPUNIT_ASSERT(
176 2 : ::cppu::UnoType< css::uno::Sequence< ::sal_Int8 > >::get() == t);
177 : t = ::cppu::UnoType<
178 2 : ::cppu::UnoSequenceType< ::cppu::UnoUnsignedShortType > >::get();
179 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SEQUENCE, +t.getTypeClass());
180 4 : CPPUNIT_ASSERT_EQUAL(
181 : ::rtl::OUString("[]unsigned short"),
182 2 : t.getTypeName());
183 : t = ::cppu::UnoType<
184 2 : ::cppu::UnoSequenceType< ::cppu::UnoCharType > >::get();
185 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SEQUENCE, +t.getTypeClass());
186 4 : CPPUNIT_ASSERT_EQUAL(
187 : ::rtl::OUString("[]char"),
188 2 : t.getTypeName());
189 : t = ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType<
190 2 : ::sal_Int8 > > >::get();
191 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SEQUENCE, +t.getTypeClass());
192 4 : CPPUNIT_ASSERT_EQUAL(
193 : ::rtl::OUString("[][]byte"),
194 2 : t.getTypeName());
195 4 : CPPUNIT_ASSERT(
196 : ::cppu::UnoType<
197 2 : css::uno::Sequence< css::uno::Sequence< ::sal_Int8 > > >::get() == t);
198 : t = ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType<
199 2 : ::cppu::UnoUnsignedShortType > > >::get();
200 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SEQUENCE, +t.getTypeClass());
201 4 : CPPUNIT_ASSERT_EQUAL(
202 : ::rtl::OUString("[][]unsigned short"),
203 2 : t.getTypeName());
204 : t = ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType<
205 2 : ::cppu::UnoCharType > > >::get();
206 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SEQUENCE, +t.getTypeClass());
207 4 : CPPUNIT_ASSERT_EQUAL(
208 : ::rtl::OUString("[][]char"),
209 2 : t.getTypeName());
210 2 : t = ::cppu::UnoType< css::uno::TypeClass >::get();
211 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_ENUM, +t.getTypeClass());
212 4 : CPPUNIT_ASSERT_EQUAL(
213 : ::rtl::OUString("com.sun.star.uno.TypeClass"),
214 2 : t.getTypeName());
215 2 : t = ::cppu::UnoType< css::lang::EventObject >::get();
216 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_STRUCT, +t.getTypeClass());
217 4 : CPPUNIT_ASSERT_EQUAL(
218 : ::rtl::OUString("com.sun.star.lang.EventObject"),
219 2 : t.getTypeName());
220 2 : CPPUNIT_ASSERT(::cppu::UnoType< DerivedStruct1 >::get() == t);
221 2 : t = ::cppu::UnoType< css::beans::PropertyChangeEvent >::get();
222 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_STRUCT, +t.getTypeClass());
223 4 : CPPUNIT_ASSERT_EQUAL(
224 : ::rtl::OUString(
225 : "com.sun.star.beans.PropertyChangeEvent"),
226 2 : t.getTypeName());
227 2 : CPPUNIT_ASSERT(::cppu::UnoType< DerivedStruct2 >::get() == t);
228 2 : t = ::cppu::UnoType< css::beans::Optional< ::sal_Int8 > >::get();
229 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_STRUCT, +t.getTypeClass());
230 4 : CPPUNIT_ASSERT_EQUAL(
231 : ::rtl::OUString("com.sun.star.beans.Optional<byte>"),
232 2 : t.getTypeName());
233 2 : t = ::cppu::UnoType< css::uno::Exception >::get();
234 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_EXCEPTION, +t.getTypeClass());
235 4 : CPPUNIT_ASSERT_EQUAL(
236 : ::rtl::OUString("com.sun.star.uno.Exception"),
237 2 : t.getTypeName());
238 2 : CPPUNIT_ASSERT(::cppu::UnoType< DerivedException1 >::get() == t);
239 2 : t = ::cppu::UnoType< css::uno::RuntimeException >::get();
240 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_EXCEPTION, +t.getTypeClass());
241 4 : CPPUNIT_ASSERT_EQUAL(
242 : ::rtl::OUString("com.sun.star.uno.RuntimeException"),
243 2 : t.getTypeName());
244 2 : CPPUNIT_ASSERT(::cppu::UnoType< DerivedException2 >::get() == t);
245 2 : t = ::cppu::UnoType< css::uno::XInterface >::get();
246 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_INTERFACE, +t.getTypeClass());
247 4 : CPPUNIT_ASSERT_EQUAL(
248 : ::rtl::OUString("com.sun.star.uno.XInterface"),
249 2 : t.getTypeName());
250 4 : CPPUNIT_ASSERT(
251 : ::cppu::UnoType< css::uno::Reference< css::uno::XInterface > >::get() ==
252 2 : t);
253 2 : CPPUNIT_ASSERT(::cppu::UnoType< DerivedInterface1 >::get() == t);
254 4 : CPPUNIT_ASSERT(
255 : ::cppu::UnoType< css::uno::Reference< DerivedInterface1 > >::get() ==
256 2 : t);
257 2 : t = ::cppu::UnoType< css::uno::XComponentContext >::get();
258 2 : CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_INTERFACE, +t.getTypeClass());
259 4 : CPPUNIT_ASSERT_EQUAL(
260 : ::rtl::OUString("com.sun.star.uno.XComponentContext"),
261 2 : t.getTypeName());
262 4 : CPPUNIT_ASSERT(
263 : ::cppu::UnoType<
264 2 : css::uno::Reference< css::uno::XComponentContext > >::get() == t);
265 2 : CPPUNIT_ASSERT(::cppu::UnoType< DerivedInterface2 >::get() == t);
266 4 : CPPUNIT_ASSERT(
267 : ::cppu::UnoType< css::uno::Reference< DerivedInterface2 > >::get() ==
268 4 : t);
269 2 : }
270 :
271 2 : void Test::testGetTypeFavourUnsigned() {
272 2 : CPPUNIT_ASSERT(typeid(::sal_Unicode) == typeid(::sal_uInt16));
273 4 : CPPUNIT_ASSERT(
274 : ::getCppuType(static_cast< ::sal_Unicode * >(0)) ==
275 2 : ::getCppuType(static_cast< ::sal_uInt16 * >(0)));
276 4 : CPPUNIT_ASSERT(
277 : ::cppu::getTypeFavourUnsigned(
278 : static_cast< ::cppu::UnoVoidType * >(0)) ==
279 2 : ::cppu::UnoType< ::cppu::UnoVoidType >::get());
280 4 : CPPUNIT_ASSERT(
281 : ::cppu::getTypeFavourUnsigned(static_cast< bool * >(0)) ==
282 2 : ::cppu::UnoType< bool >::get());
283 4 : CPPUNIT_ASSERT(
284 : ::cppu::getTypeFavourUnsigned(static_cast< bool * >(0)) ==
285 2 : ::cppu::UnoType<bool>::get());
286 4 : CPPUNIT_ASSERT(
287 : ::cppu::getTypeFavourUnsigned(static_cast< sal_Bool * >(0)) ==
288 2 : ::cppu::UnoType< bool >::get());
289 4 : CPPUNIT_ASSERT(
290 : ::cppu::getTypeFavourUnsigned(static_cast< sal_Bool * >(0)) ==
291 2 : ::cppu::UnoType<sal_Bool>::get());
292 4 : CPPUNIT_ASSERT(
293 : ::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int8 * >(0)) ==
294 2 : ::cppu::UnoType< ::sal_Int8 >::get());
295 4 : CPPUNIT_ASSERT(
296 : ::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int8 * >(0)) ==
297 2 : ::cppu::UnoType<sal_Int8>::get());
298 4 : CPPUNIT_ASSERT(
299 : ::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int16 * >(0)) ==
300 2 : ::cppu::UnoType< ::sal_Int16 >::get());
301 4 : CPPUNIT_ASSERT(
302 : ::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int16 * >(0)) ==
303 2 : ::cppu::UnoType<sal_Int16>::get());
304 4 : CPPUNIT_ASSERT(
305 : ::cppu::getTypeFavourUnsigned(
306 : static_cast< ::cppu::UnoUnsignedShortType * >(0)) ==
307 2 : ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get());
308 4 : CPPUNIT_ASSERT(
309 : ::cppu::getTypeFavourUnsigned(static_cast< ::sal_uInt16 * >(0)) ==
310 2 : ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get());
311 4 : CPPUNIT_ASSERT(
312 : ::cppu::getTypeFavourUnsigned(static_cast< ::sal_uInt16 * >(0)) ==
313 2 : ::getCppuType(static_cast< ::sal_uInt16 * >(0)));
314 4 : CPPUNIT_ASSERT(
315 : ::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int32 * >(0)) ==
316 2 : ::cppu::UnoType< ::sal_Int32 >::get());
317 4 : CPPUNIT_ASSERT(
318 : ::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int32 * >(0)) ==
319 2 : ::cppu::UnoType<sal_Int32>::get());
320 4 : CPPUNIT_ASSERT(
321 : ::cppu::getTypeFavourUnsigned(static_cast< ::sal_uInt32 * >(0)) ==
322 2 : ::cppu::UnoType< ::sal_uInt32 >::get());
323 4 : CPPUNIT_ASSERT(
324 : ::cppu::getTypeFavourUnsigned(static_cast< ::sal_uInt32 * >(0)) ==
325 2 : ::cppu::UnoType<sal_uInt32>::get());
326 4 : CPPUNIT_ASSERT(
327 : ::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int64 * >(0)) ==
328 2 : ::cppu::UnoType< ::sal_Int64 >::get());
329 4 : CPPUNIT_ASSERT(
330 : ::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int64 * >(0)) ==
331 2 : ::cppu::UnoType<sal_Int64>::get());
332 4 : CPPUNIT_ASSERT(
333 : ::cppu::getTypeFavourUnsigned(static_cast< ::sal_uInt64 * >(0)) ==
334 2 : ::cppu::UnoType< ::sal_uInt64 >::get());
335 4 : CPPUNIT_ASSERT(
336 : ::cppu::getTypeFavourUnsigned(static_cast< ::sal_uInt64 * >(0)) ==
337 2 : ::getCppuType(static_cast< ::sal_uInt64 * >(0)));
338 4 : CPPUNIT_ASSERT(
339 : ::cppu::getTypeFavourUnsigned(static_cast< float * >(0)) ==
340 2 : ::cppu::UnoType< float >::get());
341 4 : CPPUNIT_ASSERT(
342 : ::cppu::getTypeFavourUnsigned(static_cast< float * >(0)) ==
343 2 : ::cppu::UnoType<float>::get());
344 4 : CPPUNIT_ASSERT(
345 : ::cppu::getTypeFavourUnsigned(static_cast< double * >(0)) ==
346 2 : ::cppu::UnoType< double >::get());
347 4 : CPPUNIT_ASSERT(
348 : ::cppu::getTypeFavourUnsigned(static_cast< double * >(0)) ==
349 2 : ::cppu::UnoType<double>::get());
350 4 : CPPUNIT_ASSERT(
351 : ::cppu::getTypeFavourUnsigned(
352 : static_cast< ::cppu::UnoCharType * >(0)) ==
353 2 : ::cppu::UnoType< ::cppu::UnoCharType >::get());
354 4 : CPPUNIT_ASSERT(
355 : ::cppu::getTypeFavourUnsigned(static_cast< ::sal_Unicode * >(0)) ==
356 2 : ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get());
357 4 : CPPUNIT_ASSERT(
358 : ::cppu::getTypeFavourUnsigned(static_cast< ::sal_Unicode * >(0)) ==
359 2 : ::getCppuType(static_cast< ::sal_Unicode * >(0)));
360 4 : CPPUNIT_ASSERT(
361 : ::cppu::getTypeFavourUnsigned(static_cast< ::rtl::OUString * >(0)) ==
362 2 : ::cppu::UnoType< ::rtl::OUString >::get());
363 4 : CPPUNIT_ASSERT(
364 : ::cppu::getTypeFavourUnsigned(static_cast< ::rtl::OUString * >(0)) ==
365 2 : ::cppu::UnoType<rtl::OUString>::get());
366 4 : CPPUNIT_ASSERT(
367 : ::cppu::getTypeFavourUnsigned(static_cast< css::uno::Type * >(0)) ==
368 2 : ::cppu::UnoType< css::uno::Type >::get());
369 4 : CPPUNIT_ASSERT(
370 : ::cppu::getTypeFavourUnsigned(static_cast< css::uno::Type * >(0)) ==
371 2 : ::getCppuType(static_cast< css::uno::Type * >(0)));
372 4 : CPPUNIT_ASSERT(
373 : ::cppu::getTypeFavourUnsigned(static_cast< css::uno::Any * >(0)) ==
374 2 : ::cppu::UnoType< css::uno::Any >::get());
375 4 : CPPUNIT_ASSERT(
376 : ::cppu::getTypeFavourUnsigned(static_cast< css::uno::Any * >(0)) ==
377 2 : ::getCppuType(static_cast< css::uno::Any * >(0)));
378 4 : CPPUNIT_ASSERT(
379 : ::cppu::getTypeFavourUnsigned(
380 : static_cast<
381 : ::cppu::UnoSequenceType< ::cppu::UnoUnsignedShortType > * >(0)) ==
382 : ::cppu::UnoType<
383 2 : ::cppu::UnoSequenceType< ::cppu::UnoUnsignedShortType > >::get());
384 4 : CPPUNIT_ASSERT(
385 : ::cppu::getTypeFavourUnsigned(
386 : static_cast< css::uno::Sequence< ::sal_uInt16 > * >(0)) ==
387 : ::cppu::UnoType<
388 2 : ::cppu::UnoSequenceType< ::cppu::UnoUnsignedShortType > >::get());
389 4 : CPPUNIT_ASSERT(
390 : ::cppu::getTypeFavourUnsigned(
391 : static_cast< css::uno::Sequence< ::sal_uInt16 > * >(0)) ==
392 2 : ::getCppuType(static_cast< css::uno::Sequence< ::sal_uInt16 > * >(0)));
393 4 : CPPUNIT_ASSERT(
394 : ::cppu::getTypeFavourUnsigned(
395 : static_cast< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType<
396 : ::cppu::UnoUnsignedShortType > > * >(0)) ==
397 : ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType<
398 2 : ::cppu::UnoUnsignedShortType > > >::get());
399 4 : CPPUNIT_ASSERT(
400 : ::cppu::getTypeFavourUnsigned(
401 : static_cast< css::uno::Sequence< css::uno::Sequence<
402 : ::sal_uInt16 > > * >(0)) ==
403 : ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType<
404 2 : ::cppu::UnoUnsignedShortType > > >::get());
405 4 : CPPUNIT_ASSERT(
406 : ::cppu::getTypeFavourUnsigned(
407 : static_cast< css::uno::Sequence< css::uno::Sequence<
408 : ::sal_uInt16 > > * >(0)) ==
409 : ::getCppuType(
410 : static_cast< css::uno::Sequence< css::uno::Sequence<
411 2 : ::sal_uInt16 > > * >(0)));
412 4 : CPPUNIT_ASSERT(
413 : ::cppu::getTypeFavourUnsigned(
414 : static_cast< css::uno::Sequence< ::sal_Unicode > * >(0)) ==
415 : ::cppu::UnoType<
416 2 : ::cppu::UnoSequenceType< ::cppu::UnoUnsignedShortType > >::get());
417 4 : CPPUNIT_ASSERT(
418 : ::cppu::getTypeFavourUnsigned(
419 : static_cast< css::uno::Sequence< ::sal_Unicode > * >(0)) ==
420 2 : ::getCppuType(static_cast< css::uno::Sequence< ::sal_Unicode > * >(0)));
421 4 : CPPUNIT_ASSERT(
422 : ::cppu::getTypeFavourUnsigned(
423 : static_cast< css::uno::Sequence< css::uno::Sequence<
424 : ::sal_Unicode > > * >(0)) ==
425 : ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType<
426 2 : ::cppu::UnoUnsignedShortType > > >::get());
427 4 : CPPUNIT_ASSERT(
428 : ::cppu::getTypeFavourUnsigned(
429 : static_cast< css::uno::Sequence< css::uno::Sequence<
430 : ::sal_Unicode > > * >(0)) ==
431 : ::getCppuType(
432 : static_cast< css::uno::Sequence< css::uno::Sequence<
433 2 : ::sal_Unicode > > * >(0)));
434 4 : CPPUNIT_ASSERT(
435 : ::cppu::getTypeFavourUnsigned(
436 : static_cast< css::uno::TypeClass * >(0)) ==
437 2 : ::cppu::UnoType< css::uno::TypeClass >::get());
438 4 : CPPUNIT_ASSERT(
439 : ::cppu::getTypeFavourUnsigned(
440 : static_cast< css::uno::TypeClass * >(0)) ==
441 2 : ::getCppuType(static_cast< css::uno::TypeClass * >(0)));
442 4 : CPPUNIT_ASSERT(
443 : ::cppu::getTypeFavourUnsigned(
444 : static_cast< css::lang::EventObject * >(0)) ==
445 2 : ::cppu::UnoType< css::lang::EventObject >::get());
446 4 : CPPUNIT_ASSERT(
447 : ::cppu::getTypeFavourUnsigned(
448 : static_cast< css::lang::EventObject * >(0)) ==
449 2 : ::cppu::UnoType<css::lang::EventObject>::get());
450 4 : CPPUNIT_ASSERT(
451 : ::cppu::getTypeFavourUnsigned(static_cast< DerivedStruct1 * >(0)) ==
452 2 : ::cppu::UnoType< css::lang::EventObject >::get());
453 4 : CPPUNIT_ASSERT(
454 : ::cppu::getTypeFavourUnsigned(static_cast< DerivedStruct1 * >(0)) ==
455 2 : ::getCppuType(static_cast< DerivedStruct1 * >(0)));
456 4 : CPPUNIT_ASSERT(
457 : ::cppu::getTypeFavourUnsigned(
458 : static_cast< css::beans::PropertyChangeEvent * >(0)) ==
459 2 : ::cppu::UnoType< css::beans::PropertyChangeEvent >::get());
460 4 : CPPUNIT_ASSERT(
461 : ::cppu::getTypeFavourUnsigned(
462 : static_cast< css::beans::PropertyChangeEvent * >(0)) ==
463 2 : ::cppu::UnoType<css::beans::PropertyChangeEvent>::get());
464 4 : CPPUNIT_ASSERT(
465 : ::cppu::getTypeFavourUnsigned(static_cast< DerivedStruct2 * >(0)) ==
466 2 : ::cppu::UnoType< css::beans::PropertyChangeEvent >::get());
467 4 : CPPUNIT_ASSERT(
468 : ::cppu::getTypeFavourUnsigned(static_cast< DerivedStruct2 * >(0)) ==
469 2 : ::getCppuType(static_cast< DerivedStruct2 * >(0)));
470 4 : CPPUNIT_ASSERT(
471 : ::cppu::getTypeFavourUnsigned(
472 : static_cast< css::beans::Optional< ::sal_Int8 > * >(0)) ==
473 2 : ::cppu::UnoType< css::beans::Optional< ::sal_Int8 > >::get());
474 4 : CPPUNIT_ASSERT(
475 : ::cppu::getTypeFavourUnsigned(
476 : static_cast< css::beans::Optional< ::sal_Int8 > * >(0)) ==
477 2 : ::getCppuType(static_cast< css::beans::Optional< ::sal_Int8 > * >(0)));
478 4 : CPPUNIT_ASSERT(
479 : ::cppu::getTypeFavourUnsigned(
480 : static_cast< css::uno::Exception * >(0)) ==
481 2 : ::cppu::UnoType< css::uno::Exception >::get());
482 4 : CPPUNIT_ASSERT(
483 : ::cppu::getTypeFavourUnsigned(
484 : static_cast< css::uno::Exception * >(0)) ==
485 2 : ::cppu::UnoType<css::uno::Exception>::get());
486 4 : CPPUNIT_ASSERT(
487 : ::cppu::getTypeFavourUnsigned(static_cast< DerivedException1 * >(0)) ==
488 2 : ::cppu::UnoType< css::uno::Exception >::get());
489 4 : CPPUNIT_ASSERT(
490 : ::cppu::getTypeFavourUnsigned(static_cast< DerivedException1 * >(0)) ==
491 2 : ::getCppuType(static_cast< DerivedException1 * >(0)));
492 4 : CPPUNIT_ASSERT(
493 : ::cppu::getTypeFavourUnsigned(
494 : static_cast< css::uno::RuntimeException * >(0)) ==
495 2 : ::cppu::UnoType< css::uno::RuntimeException >::get());
496 4 : CPPUNIT_ASSERT(
497 : ::cppu::getTypeFavourUnsigned(
498 : static_cast< css::uno::RuntimeException * >(0)) ==
499 2 : ::getCppuType(static_cast< css::uno::RuntimeException * >(0)));
500 4 : CPPUNIT_ASSERT(
501 : ::cppu::getTypeFavourUnsigned(static_cast< DerivedException2 * >(0)) ==
502 2 : ::cppu::UnoType< css::uno::RuntimeException >::get());
503 4 : CPPUNIT_ASSERT(
504 : ::cppu::getTypeFavourUnsigned(static_cast< DerivedException2 * >(0)) ==
505 2 : ::getCppuType(static_cast< DerivedException2 * >(0)));
506 4 : CPPUNIT_ASSERT(
507 : ::cppu::getTypeFavourUnsigned(
508 : static_cast< css::uno::XInterface * >(0)) ==
509 2 : ::cppu::UnoType< css::uno::XInterface >::get());
510 4 : CPPUNIT_ASSERT(
511 : ::cppu::getTypeFavourUnsigned(
512 : static_cast< css::uno::Reference< css::uno::XInterface > * >(0)) ==
513 2 : ::cppu::UnoType< css::uno::XInterface >::get());
514 4 : CPPUNIT_ASSERT(
515 : ::cppu::getTypeFavourUnsigned(
516 : static_cast< css::uno::Reference< css::uno::XInterface > * >(0)) ==
517 : ::getCppuType(
518 2 : static_cast< css::uno::Reference< css::uno::XInterface > * >(0)));
519 4 : CPPUNIT_ASSERT(
520 : ::cppu::getTypeFavourUnsigned(static_cast< DerivedInterface1 * >(0)) ==
521 2 : ::cppu::UnoType< css::uno::XInterface >::get());
522 4 : CPPUNIT_ASSERT(
523 : ::cppu::getTypeFavourUnsigned(
524 : static_cast< css::uno::Reference< DerivedInterface1 > * >(0)) ==
525 2 : ::cppu::UnoType< css::uno::XInterface >::get());
526 4 : CPPUNIT_ASSERT(
527 : ::cppu::getTypeFavourUnsigned(
528 : static_cast< css::uno::XComponentContext * >(0)) ==
529 2 : ::cppu::UnoType< css::uno::XComponentContext >::get());
530 4 : CPPUNIT_ASSERT(
531 : ::cppu::getTypeFavourUnsigned(
532 : static_cast<
533 : css::uno::Reference< css::uno::XComponentContext > * >(0)) ==
534 2 : ::cppu::UnoType< css::uno::XComponentContext >::get());
535 4 : CPPUNIT_ASSERT(
536 : ::cppu::getTypeFavourUnsigned(
537 : static_cast<
538 : css::uno::Reference< css::uno::XComponentContext > * >(0)) ==
539 2 : cppu::UnoType<css::uno::XComponentContext>::get());
540 4 : CPPUNIT_ASSERT(
541 : ::cppu::getTypeFavourUnsigned(static_cast< DerivedInterface2 * >(0)) ==
542 2 : ::cppu::UnoType< css::uno::XComponentContext >::get());
543 4 : CPPUNIT_ASSERT(
544 : ::cppu::getTypeFavourUnsigned(
545 : static_cast< css::uno::Reference< DerivedInterface2 > * >(0)) ==
546 2 : ::cppu::UnoType< css::uno::XComponentContext >::get());
547 2 : }
548 :
549 2 : void Test::testGetTypeFavourChar() {
550 2 : CPPUNIT_ASSERT(typeid(::sal_Unicode) == typeid(::sal_uInt16));
551 4 : CPPUNIT_ASSERT(
552 2 : ::getCppuType< ::sal_Unicode >() == ::getCppuType< ::sal_uInt16 >());
553 4 : CPPUNIT_ASSERT(
554 : ::cppu::getTypeFavourChar(static_cast< ::cppu::UnoVoidType * >(0)) ==
555 2 : ::cppu::UnoType< ::cppu::UnoVoidType >::get());
556 4 : CPPUNIT_ASSERT(
557 : ::cppu::getTypeFavourChar(static_cast< bool * >(0)) ==
558 2 : ::cppu::UnoType< bool >::get());
559 4 : CPPUNIT_ASSERT(
560 : ::cppu::getTypeFavourChar(static_cast< bool * >(0)) ==
561 2 : ::getCppuType< bool >());
562 4 : CPPUNIT_ASSERT(
563 : ::cppu::getTypeFavourChar(static_cast< sal_Bool * >(0)) ==
564 2 : ::cppu::UnoType< bool >::get());
565 4 : CPPUNIT_ASSERT(
566 : ::cppu::getTypeFavourChar(static_cast< sal_Bool * >(0)) ==
567 2 : ::getCppuType< sal_Bool >());
568 4 : CPPUNIT_ASSERT(
569 : ::cppu::getTypeFavourChar(static_cast< ::sal_Int8 * >(0)) ==
570 2 : ::cppu::UnoType< ::sal_Int8 >::get());
571 4 : CPPUNIT_ASSERT(
572 : ::cppu::getTypeFavourChar(static_cast< ::sal_Int8 * >(0)) ==
573 2 : ::getCppuType< ::sal_Int8 >());
574 4 : CPPUNIT_ASSERT(
575 : ::cppu::getTypeFavourChar(static_cast< ::sal_Int16 * >(0)) ==
576 2 : ::cppu::UnoType< ::sal_Int16 >::get());
577 4 : CPPUNIT_ASSERT(
578 : ::cppu::getTypeFavourChar(static_cast< ::sal_Int16 * >(0)) ==
579 2 : ::getCppuType< ::sal_Int16 >());
580 4 : CPPUNIT_ASSERT(
581 : ::cppu::getTypeFavourChar(
582 : static_cast< ::cppu::UnoUnsignedShortType * >(0)) ==
583 2 : ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get());
584 4 : CPPUNIT_ASSERT(
585 : ::cppu::getTypeFavourChar(static_cast< ::sal_uInt16 * >(0)) ==
586 2 : ::cppu::UnoType< ::cppu::UnoCharType >::get());
587 4 : CPPUNIT_ASSERT(
588 : ::cppu::getTypeFavourChar(static_cast< ::sal_Int32 * >(0)) ==
589 2 : ::cppu::UnoType< ::sal_Int32 >::get());
590 4 : CPPUNIT_ASSERT(
591 : ::cppu::getTypeFavourChar(static_cast< ::sal_Int32 * >(0)) ==
592 2 : ::getCppuType< ::sal_Int32 >());
593 4 : CPPUNIT_ASSERT(
594 : ::cppu::getTypeFavourChar(static_cast< ::sal_uInt32 * >(0)) ==
595 2 : ::cppu::UnoType< ::sal_uInt32 >::get());
596 4 : CPPUNIT_ASSERT(
597 : ::cppu::getTypeFavourChar(static_cast< ::sal_uInt32 * >(0)) ==
598 2 : ::getCppuType< ::sal_uInt32 >());
599 4 : CPPUNIT_ASSERT(
600 : ::cppu::getTypeFavourChar(static_cast< ::sal_Int64 * >(0)) ==
601 2 : ::cppu::UnoType< ::sal_Int64 >::get());
602 4 : CPPUNIT_ASSERT(
603 : ::cppu::getTypeFavourChar(static_cast< ::sal_Int64 * >(0)) ==
604 2 : ::getCppuType< ::sal_Int64 >());
605 4 : CPPUNIT_ASSERT(
606 : ::cppu::getTypeFavourChar(static_cast< ::sal_uInt64 * >(0)) ==
607 2 : ::cppu::UnoType< ::sal_uInt64 >::get());
608 4 : CPPUNIT_ASSERT(
609 : ::cppu::getTypeFavourChar(static_cast< ::sal_uInt64 * >(0)) ==
610 2 : ::getCppuType< ::sal_uInt64 >());
611 4 : CPPUNIT_ASSERT(
612 : ::cppu::getTypeFavourChar(static_cast< float * >(0)) ==
613 2 : ::cppu::UnoType< float >::get());
614 4 : CPPUNIT_ASSERT(
615 : ::cppu::getTypeFavourChar(static_cast< float * >(0)) ==
616 2 : ::getCppuType< float >());
617 4 : CPPUNIT_ASSERT(
618 : ::cppu::getTypeFavourChar(static_cast< double * >(0)) ==
619 2 : ::cppu::UnoType< double >::get());
620 4 : CPPUNIT_ASSERT(
621 : ::cppu::getTypeFavourChar(static_cast< double * >(0)) ==
622 2 : ::getCppuType< double >());
623 4 : CPPUNIT_ASSERT(
624 : ::cppu::getTypeFavourChar(static_cast< ::cppu::UnoCharType * >(0)) ==
625 2 : ::cppu::UnoType< ::cppu::UnoCharType >::get());
626 4 : CPPUNIT_ASSERT(
627 : ::cppu::getTypeFavourChar(static_cast< ::sal_Unicode * >(0)) ==
628 2 : ::cppu::UnoType< ::cppu::UnoCharType >::get());
629 4 : CPPUNIT_ASSERT(
630 : ::cppu::getTypeFavourChar(static_cast< ::sal_Unicode * >(0)) ==
631 2 : ::getCppuType< ::sal_Unicode >());
632 4 : CPPUNIT_ASSERT(
633 : ::cppu::getTypeFavourChar(static_cast< ::rtl::OUString * >(0)) ==
634 2 : ::cppu::UnoType< ::rtl::OUString >::get());
635 4 : CPPUNIT_ASSERT(
636 : ::cppu::getTypeFavourChar(static_cast< ::rtl::OUString * >(0)) ==
637 2 : ::getCppuType< ::rtl::OUString >());
638 4 : CPPUNIT_ASSERT(
639 : ::cppu::getTypeFavourChar(static_cast< css::uno::Type * >(0)) ==
640 2 : ::cppu::UnoType< css::uno::Type >::get());
641 4 : CPPUNIT_ASSERT(
642 : ::cppu::getTypeFavourChar(static_cast< css::uno::Type * >(0)) ==
643 2 : ::getCppuType< css::uno::Type >());
644 4 : CPPUNIT_ASSERT(
645 : ::cppu::getTypeFavourChar(static_cast< css::uno::Any * >(0)) ==
646 2 : ::cppu::UnoType< css::uno::Any >::get());
647 4 : CPPUNIT_ASSERT(
648 : ::cppu::getTypeFavourChar(static_cast< css::uno::Any * >(0)) ==
649 2 : ::getCppuType< css::uno::Any >());
650 4 : CPPUNIT_ASSERT(
651 : ::cppu::getTypeFavourChar(
652 : static_cast<
653 : ::cppu::UnoSequenceType< ::cppu::UnoUnsignedShortType > * >(0)) ==
654 : ::cppu::UnoType<
655 2 : ::cppu::UnoSequenceType< ::cppu::UnoUnsignedShortType > >::get());
656 4 : CPPUNIT_ASSERT(
657 : ::cppu::getTypeFavourChar(
658 : static_cast< css::uno::Sequence< ::sal_uInt16 > * >(0)) ==
659 : ::cppu::UnoType<
660 2 : ::cppu::UnoSequenceType< ::cppu::UnoCharType > >::get());
661 4 : CPPUNIT_ASSERT(
662 : ::cppu::getTypeFavourChar(
663 : static_cast< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType<
664 : ::cppu::UnoUnsignedShortType > > * >(0)) ==
665 : ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType<
666 2 : ::cppu::UnoUnsignedShortType > > >::get());
667 4 : CPPUNIT_ASSERT(
668 : ::cppu::getTypeFavourChar(
669 : static_cast< css::uno::Sequence< css::uno::Sequence<
670 : ::sal_uInt16 > > * >(0)) ==
671 : ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType<
672 2 : ::cppu::UnoCharType > > >::get());
673 4 : CPPUNIT_ASSERT(
674 : ::cppu::getTypeFavourChar(
675 : static_cast< css::uno::Sequence< ::sal_Unicode > * >(0)) ==
676 : ::cppu::UnoType<
677 2 : ::cppu::UnoSequenceType< ::cppu::UnoCharType > >::get());
678 4 : CPPUNIT_ASSERT(
679 : ::cppu::getTypeFavourChar(
680 : static_cast< css::uno::Sequence< css::uno::Sequence<
681 : ::sal_Unicode > > * >(0)) ==
682 : ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType<
683 2 : ::cppu::UnoCharType > > >::get());
684 4 : CPPUNIT_ASSERT(
685 : ::cppu::getTypeFavourChar(static_cast< css::uno::TypeClass * >(0)) ==
686 2 : ::cppu::UnoType< css::uno::TypeClass >::get());
687 4 : CPPUNIT_ASSERT(
688 : ::cppu::getTypeFavourChar(static_cast< css::uno::TypeClass * >(0)) ==
689 2 : ::getCppuType< css::uno::TypeClass >());
690 4 : CPPUNIT_ASSERT(
691 : ::cppu::getTypeFavourChar(
692 : static_cast< css::lang::EventObject * >(0)) ==
693 2 : ::cppu::UnoType< css::lang::EventObject >::get());
694 4 : CPPUNIT_ASSERT(
695 : ::cppu::getTypeFavourChar(
696 : static_cast< css::lang::EventObject * >(0)) ==
697 2 : ::getCppuType< css::lang::EventObject >());
698 4 : CPPUNIT_ASSERT(
699 : ::cppu::getTypeFavourChar(static_cast< DerivedStruct1 * >(0)) ==
700 2 : ::cppu::UnoType< css::lang::EventObject >::get());
701 4 : CPPUNIT_ASSERT(
702 : ::cppu::getTypeFavourChar(static_cast< DerivedStruct1 * >(0)) ==
703 2 : ::getCppuType< DerivedStruct1 >());
704 4 : CPPUNIT_ASSERT(
705 : ::cppu::getTypeFavourChar(
706 : static_cast< css::beans::PropertyChangeEvent * >(0)) ==
707 2 : ::cppu::UnoType< css::beans::PropertyChangeEvent >::get());
708 4 : CPPUNIT_ASSERT(
709 : ::cppu::getTypeFavourChar(
710 : static_cast< css::beans::PropertyChangeEvent * >(0)) ==
711 2 : ::getCppuType< css::beans::PropertyChangeEvent >());
712 4 : CPPUNIT_ASSERT(
713 : ::cppu::getTypeFavourChar(static_cast< DerivedStruct2 * >(0)) ==
714 2 : ::cppu::UnoType< css::beans::PropertyChangeEvent >::get());
715 4 : CPPUNIT_ASSERT(
716 : ::cppu::getTypeFavourChar(static_cast< DerivedStruct2 * >(0)) ==
717 2 : ::getCppuType< DerivedStruct2 >());
718 4 : CPPUNIT_ASSERT(
719 : ::cppu::getTypeFavourChar(
720 : static_cast< css::beans::Optional< ::sal_Int8 > * >(0)) ==
721 2 : ::cppu::UnoType< css::beans::Optional< ::sal_Int8 > >::get());
722 4 : CPPUNIT_ASSERT(
723 : ::cppu::getTypeFavourChar(
724 : static_cast< css::beans::Optional< ::sal_Int8 > * >(0)) ==
725 2 : ::getCppuType< css::beans::Optional< ::sal_Int8 > >());
726 4 : CPPUNIT_ASSERT(
727 : ::cppu::getTypeFavourChar(static_cast< css::uno::Exception * >(0)) ==
728 2 : ::cppu::UnoType< css::uno::Exception >::get());
729 4 : CPPUNIT_ASSERT(
730 : ::cppu::getTypeFavourChar(static_cast< css::uno::Exception * >(0)) ==
731 2 : ::getCppuType< css::uno::Exception >());
732 4 : CPPUNIT_ASSERT(
733 : ::cppu::getTypeFavourChar(static_cast< DerivedException1 * >(0)) ==
734 2 : ::cppu::UnoType< css::uno::Exception >::get());
735 4 : CPPUNIT_ASSERT(
736 : ::cppu::getTypeFavourChar(static_cast< DerivedException1 * >(0)) ==
737 2 : ::getCppuType< DerivedException1 >());
738 4 : CPPUNIT_ASSERT(
739 : ::cppu::getTypeFavourChar(
740 : static_cast< css::uno::RuntimeException * >(0)) ==
741 2 : ::cppu::UnoType< css::uno::RuntimeException >::get());
742 4 : CPPUNIT_ASSERT(
743 : ::cppu::getTypeFavourChar(
744 : static_cast< css::uno::RuntimeException * >(0)) ==
745 2 : ::getCppuType< css::uno::RuntimeException >());
746 4 : CPPUNIT_ASSERT(
747 : ::cppu::getTypeFavourChar(static_cast< DerivedException2 * >(0)) ==
748 2 : ::cppu::UnoType< css::uno::RuntimeException >::get());
749 4 : CPPUNIT_ASSERT(
750 : ::cppu::getTypeFavourChar(static_cast< DerivedException2 * >(0)) ==
751 2 : ::getCppuType< DerivedException2 >());
752 4 : CPPUNIT_ASSERT(
753 : ::cppu::getTypeFavourChar(
754 : static_cast< css::uno::XInterface * >(0)) ==
755 2 : ::cppu::UnoType< css::uno::XInterface >::get());
756 4 : CPPUNIT_ASSERT(
757 : ::cppu::getTypeFavourChar(
758 : static_cast< css::uno::Reference< css::uno::XInterface > * >(0)) ==
759 2 : ::cppu::UnoType< css::uno::XInterface >::get());
760 4 : CPPUNIT_ASSERT(
761 : ::cppu::getTypeFavourChar(
762 : static_cast< css::uno::Reference< css::uno::XInterface > * >(0)) ==
763 2 : ::getCppuType< css::uno::Reference< css::uno::XInterface > >());
764 4 : CPPUNIT_ASSERT(
765 : ::cppu::getTypeFavourChar(static_cast< DerivedInterface1 * >(0)) ==
766 2 : ::cppu::UnoType< css::uno::XInterface >::get());
767 4 : CPPUNIT_ASSERT(
768 : ::cppu::getTypeFavourChar(
769 : static_cast< css::uno::Reference< DerivedInterface1 > * >(0)) ==
770 2 : ::cppu::UnoType< css::uno::XInterface >::get());
771 4 : CPPUNIT_ASSERT(
772 : ::cppu::getTypeFavourChar(
773 : static_cast< css::uno::XComponentContext * >(0)) ==
774 2 : ::cppu::UnoType< css::uno::XComponentContext >::get());
775 4 : CPPUNIT_ASSERT(
776 : ::cppu::getTypeFavourChar(
777 : static_cast<
778 : css::uno::Reference< css::uno::XComponentContext > * >(0)) ==
779 2 : ::cppu::UnoType< css::uno::XComponentContext >::get());
780 4 : CPPUNIT_ASSERT(
781 : ::cppu::getTypeFavourChar(
782 : static_cast<
783 : css::uno::Reference< css::uno::XComponentContext > * >(0)) ==
784 2 : ::getCppuType< css::uno::Reference< css::uno::XComponentContext > >());
785 4 : CPPUNIT_ASSERT(
786 : ::cppu::getTypeFavourChar(static_cast< DerivedInterface2 * >(0)) ==
787 2 : ::cppu::UnoType< css::uno::XComponentContext >::get());
788 4 : CPPUNIT_ASSERT(
789 : ::cppu::getTypeFavourChar(
790 : static_cast< css::uno::Reference< DerivedInterface2 > * >(0)) ==
791 2 : ::cppu::UnoType< css::uno::XComponentContext >::get());
792 2 : }
793 :
794 2 : CPPUNIT_TEST_SUITE_REGISTRATION(Test);
795 :
796 : }
797 :
798 8 : CPPUNIT_PLUGIN_IMPLEMENT();
799 :
800 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|