INTEGRATION: CWS sb20 (1.3.4); FILE MERGED

2004/07/06 13:00:04 sb 1.3.4.1: #i31129# New getCppuType template that favors UNO type CHAR (sal_Unicode) over UNO type UNSIGNED SHORT (sal_uInt16), in case both have the same underlying C++ type.
This commit is contained in:
Rüdiger Timm
2004-07-23 13:46:37 +00:00
parent 0e0e63b71b
commit dae14f742c

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: test_codemaker_cppumaker.cxx,v $ * $RCSfile: test_codemaker_cppumaker.cxx,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: obo $ $Date: 2004-06-04 03:14:54 $ * last change: $Author: rt $ $Date: 2004-07-23 14:46:37 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -236,6 +236,8 @@
#include "com/sun/star/uno/Type.hxx" #include "com/sun/star/uno/Type.hxx"
#include "com/sun/star/uno/TypeClass.hpp" #include "com/sun/star/uno/TypeClass.hpp"
#include "cppunit/simpleheader.hxx" #include "cppunit/simpleheader.hxx"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
#include <cstddef> #include <cstddef>
@@ -245,8 +247,11 @@ class Test: public CppUnit::TestFixture {
public: public:
void testBigStruct(); void testBigStruct();
void testPolyCharStruct();
CPPUNIT_TEST_SUITE(Test); CPPUNIT_TEST_SUITE(Test);
CPPUNIT_TEST(testBigStruct); CPPUNIT_TEST(testBigStruct);
CPPUNIT_TEST(testPolyCharStruct);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
}; };
@@ -302,6 +307,16 @@ void Test::testBigStruct() {
#endif #endif
} }
void Test::testPolyCharStruct() {
CPPUNIT_ASSERT_EQUAL(
rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
"test.codemaker.cppumaker.Struct<char,short>")),
(com::sun::star::uno::makeAny(
test::codemaker::cppumaker::Struct< sal_Unicode, sal_Int16 >()).
getValueType().getTypeName()));
}
CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests"); CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests");
} }