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