Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


I noticed that if I did this:
diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx
index bbea200..f0d2b03 100644
--- a/cppu/qa/test_unotype.cxx
+++ b/cppu/qa/test_unotype.cxx
@@ -271,8 +271,8 @@ void Test::testUnoType() {
 void Test::testGetTypeFavourUnsigned() {
     CPPUNIT_ASSERT(typeid(::sal_Unicode) == typeid(::sal_uInt16));
     CPPUNIT_ASSERT(
-        ::getCppuType(static_cast< ::sal_Unicode * >(0)) ==
-        ::getCppuType(static_cast< ::sal_uInt16 * >(0)));
+        cppu::UnoType<cppu::UnoCharType>::get() ==
+        cppu::UnoType<cppu::UnoUnsignedShortType>::get() );

make cppu gives this:
/home/julien/compile-libreoffice/libreoffice/cppu/qa/test_unotype.cxx:275:(anonymous
namespace)::Test::testGetTypeFavourUnsigned
assertion failed
- Expression: cppu::UnoType<cppu::UnoCharType>::get() ==
cppu::UnoType<cppu::UnoUnsignedShortType>::get()

test_unotype.cxx:275:Assertion
Test name: (anonymous namespace)::Test::testGetTypeFavourUnsigned
assertion failed
- Expression: cppu::UnoType<cppu::UnoCharType>::get() ==
cppu::UnoType<cppu::UnoUnsignedShortType>::get()

Failures !!!
Run: 3   Failure total: 1   Failures: 1   Errors: 0

I don't understand why it's failing in this case.
Any idea?

Also, I noticed this:
    273     CPPUNIT_ASSERT(
    274         ::getCppuType(static_cast< ::sal_Unicode * >(0)) ==
    275         ::getCppuType(static_cast< ::sal_uInt16 * >(0)));


    551     CPPUNIT_ASSERT(
    552         ::getCppuType< ::sal_Unicode >() == ::getCppuType<
::sal_uInt16 >());
How could the line 552 be converted to remove getCppuType? (compared with
first case)

Julien



--
View this message in context: 
http://nabble.documentfoundation.org/Questions-about-getCppuType-tp4106361p4109104.html
Sent from the Dev mailing list archive at Nabble.com.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.