From dae14f742c7540a56fc360ea6954f9044186faa0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Timm?= Date: Fri, 23 Jul 2004 13:46:37 +0000 Subject: [PATCH] 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. --- .../cppumaker/test_codemaker_cppumaker.cxx | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx b/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx index 4a644df88be0..342f719153e2 100644 --- a/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx +++ b/codemaker/test/cppumaker/test_codemaker_cppumaker.cxx @@ -2,9 +2,9 @@ * * $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 * either of the following licenses @@ -236,6 +236,8 @@ #include "com/sun/star/uno/Type.hxx" #include "com/sun/star/uno/TypeClass.hpp" #include "cppunit/simpleheader.hxx" +#include "rtl/ustring.h" +#include "rtl/ustring.hxx" #include @@ -245,8 +247,11 @@ class Test: public CppUnit::TestFixture { public: void testBigStruct(); + void testPolyCharStruct(); + CPPUNIT_TEST_SUITE(Test); CPPUNIT_TEST(testBigStruct); + CPPUNIT_TEST(testPolyCharStruct); CPPUNIT_TEST_SUITE_END(); }; @@ -302,6 +307,16 @@ void Test::testBigStruct() { #endif } +void Test::testPolyCharStruct() { + CPPUNIT_ASSERT_EQUAL( + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + "test.codemaker.cppumaker.Struct")), + (com::sun::star::uno::makeAny( + test::codemaker::cppumaker::Struct< sal_Unicode, sal_Int16 >()). + getValueType().getTypeName())); +} + CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests"); }