On 05/17/2014 01:42 AM, julien2412 [via Document Foundation Mail 
<br/>Archive] wrote:
<div class='shrinkable-quote'><br/>> I noticed that if I did this:
<br/>> diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx
<br/>> index bbea200..f0d2b03 100644
<br/>> --- a/cppu/qa/test_unotype.cxx
<br/>> +++ b/cppu/qa/test_unotype.cxx
<br/>> @@ -271,8 +271,8 @@ void Test::testUnoType() {
<br/>>   void Test::testGetTypeFavourUnsigned() {
<br/>>       CPPUNIT_ASSERT(typeid(::sal_Unicode) == typeid(::sal_uInt16));
<br/>>       CPPUNIT_ASSERT(
<br/>> -        ::getCppuType(static_cast< ::sal_Unicode * >(0)) ==
<br/>> -        ::getCppuType(static_cast< ::sal_uInt16 * >(0)));
<br/>> +        cppu::UnoType<cppu::UnoCharType>::get() ==
<br/>> +        cppu::UnoType<cppu::UnoUnsignedShortType>::get() );
<br/>>
<br/>> make cppu gives this:
<br/>> /home/julien/compile-libreoffice/libreoffice/cppu/qa/test_unotype.cxx:275:(anonymous
<br/>> namespace)::Test::testGetTypeFavourUnsigned
<br/>> assertion failed
<br/>> - Expression: cppu::UnoType<cppu::UnoCharType>::get() ==
<br/>> cppu::UnoType<cppu::UnoUnsignedShortType>::get()
<br/>>
<br/>> test_unotype.cxx:275:Assertion
<br/>> Test name: (anonymous namespace)::Test::testGetTypeFavourUnsigned
<br/>> assertion failed
<br/>> - Expression: cppu::UnoType<cppu::UnoCharType>::get() ==
<br/>> cppu::UnoType<cppu::UnoUnsignedShortType>::get()
<br/>>
<br/>> Failures !!!
<br/>> Run: 3   Failure total: 1   Failures: 1   Errors: 0
<br/>>
<br/>> I don't understand why it's failing in this case.
<br/>> Any idea?
</div><br/>That code is a test that getCppuType (mis-)behaves as advertised, and 
<br/>conflates sal_Unicode/sal_uInt16.  Do not change code testing 
<br/>getCppuType/getTypeFavourUnsigned/getTypeFavourChar to use UnoType instead.
<br/><br/>Stephan
<br/>

        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://nabble.documentfoundation.org/Questions-about-getCppuType-tp4106361p4109307.html">Re: Questions about getCppuType</a><br/>
Sent from the <a href="http://nabble.documentfoundation.org/Dev-f1639786.html">Dev mailing list archive</a> at Nabble.com.<br/>