summaryrefslogtreecommitdiff
path: root/cppu
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-12-19 11:32:08 +0100
committerStephan Bergmann <sbergman@redhat.com>2011-12-19 11:33:12 +0100
commit63141d21b1a540819b9a2e80b13c77a20efbda1e (patch)
treebb68cdada6c10b777ea67fe50c98b6fb5d243f93 /cppu
parent15ae1ad3a0f37b465e4288250e578841b506cea2 (diff)
-Werror=sign-promo fixes
Diffstat (limited to 'cppu')
-rw-r--r--cppu/qa/cppumaker/test_cppumaker.cxx12
-rw-r--r--cppu/qa/test_unotype.cxx60
2 files changed, 37 insertions, 35 deletions
diff --git a/cppu/qa/cppumaker/test_cppumaker.cxx b/cppu/qa/cppumaker/test_cppumaker.cxx
index 19c48942b5f5..3770cb307afa 100644
--- a/cppu/qa/cppumaker/test_cppumaker.cxx
+++ b/cppu/qa/cppumaker/test_cppumaker.cxx
@@ -453,17 +453,17 @@ void Test::testBigStruct() {
CPPUNIT_ASSERT_EQUAL(guard.p->m11, static_cast< sal_Unicode >(0));
CPPUNIT_ASSERT_EQUAL(guard.p->m12.getLength(), static_cast< sal_Int32 >(0));
CPPUNIT_ASSERT_EQUAL(
- guard.p->m13.getTypeClass(), com::sun::star::uno::TypeClass_VOID);
+ +guard.p->m13.getTypeClass(), +com::sun::star::uno::TypeClass_VOID);
CPPUNIT_ASSERT_EQUAL(guard.p->m14.hasValue(), sal_False);
CPPUNIT_ASSERT_EQUAL(guard.p->m15.getLength(), static_cast< sal_Int32 >(0));
CPPUNIT_ASSERT_EQUAL(
- guard.p->m16, test::codemaker::cppumaker::HelperEnum_ZERO);
+ +guard.p->m16, +test::codemaker::cppumaker::HelperEnum_ZERO);
CPPUNIT_ASSERT_EQUAL(guard.p->m17.m1, sal_False);
CPPUNIT_ASSERT_EQUAL(guard.p->m17.m2.is(), sal_False);
CPPUNIT_ASSERT_EQUAL(guard.p->m18.is(), sal_False);
CPPUNIT_ASSERT_EQUAL(guard.p->m19, static_cast< sal_Int8 >(0));
CPPUNIT_ASSERT_EQUAL(
- guard.p->m20, test::codemaker::cppumaker::HelperEnum_ZERO);
+ +guard.p->m20, +test::codemaker::cppumaker::HelperEnum_ZERO);
CPPUNIT_ASSERT_EQUAL(guard.p->m21.getLength(), static_cast< sal_Int32 >(0));
CPPUNIT_ASSERT_EQUAL(guard.p->m22.getLength(), static_cast< sal_Int32 >(0));
CPPUNIT_ASSERT_EQUAL(guard.p->m23.getLength(), static_cast< sal_Int32 >(0));
@@ -488,11 +488,11 @@ void Test::testBigStruct() {
typelib_typedescription_complete(&td);
fprintf(stdout, "#### 1\n");
CPPUNIT_ASSERT(td != NULL);
- CPPUNIT_ASSERT_EQUAL(typelib_TypeClass_STRUCT, td->eTypeClass);
+ CPPUNIT_ASSERT_EQUAL(+typelib_TypeClass_STRUCT, +td->eTypeClass);
typelib_StructTypeDescription * std =
reinterpret_cast< typelib_StructTypeDescription * >(td);
- CPPUNIT_ASSERT_EQUAL(typelib_TypeClass_UNSIGNED_SHORT, std->aBase.ppTypeRefs[3]->eTypeClass); // unsigned short m4;
- CPPUNIT_ASSERT_EQUAL(typelib_TypeClass_CHAR, std->aBase.ppTypeRefs[10]->eTypeClass); // char m11;
+ CPPUNIT_ASSERT_EQUAL(+typelib_TypeClass_UNSIGNED_SHORT, +std->aBase.ppTypeRefs[3]->eTypeClass); // unsigned short m4;
+ CPPUNIT_ASSERT_EQUAL(+typelib_TypeClass_CHAR, +std->aBase.ppTypeRefs[10]->eTypeClass); // char m11;
}
void Test::testPolyStruct() {
diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx
index da74c62ddae0..157cfcb1304d 100644
--- a/cppu/qa/test_unotype.cxx
+++ b/cppu/qa/test_unotype.cxx
@@ -96,74 +96,76 @@ public:
void Test::testUnoType() {
css::uno::Type t;
t = ::cppu::UnoType< ::cppu::UnoVoidType >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_VOID, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_VOID, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("void")), t.getTypeName());
t = ::cppu::UnoType< bool >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_BOOLEAN, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_BOOLEAN, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("boolean")),
t.getTypeName());
CPPUNIT_ASSERT(::cppu::UnoType< ::sal_Bool >::get() == t);
t = ::cppu::UnoType< ::sal_Int8 >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_BYTE, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_BYTE, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("byte")), t.getTypeName());
t = ::cppu::UnoType< ::sal_Int16 >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_SHORT, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SHORT, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("short")), t.getTypeName());
t = ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_UNSIGNED_SHORT, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(
+ +css::uno::TypeClass_UNSIGNED_SHORT, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("unsigned short")),
t.getTypeName());
t = ::cppu::UnoType< ::sal_Int32 >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_LONG, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_LONG, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("long")), t.getTypeName());
t = ::cppu::UnoType< ::sal_uInt32 >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_UNSIGNED_LONG, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_UNSIGNED_LONG, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("unsigned long")),
t.getTypeName());
t = ::cppu::UnoType< ::sal_Int64 >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_HYPER, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_HYPER, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("hyper")), t.getTypeName());
t = ::cppu::UnoType< ::sal_uInt64 >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_UNSIGNED_HYPER, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(
+ +css::uno::TypeClass_UNSIGNED_HYPER, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("unsigned hyper")),
t.getTypeName());
t = ::cppu::UnoType< float >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_FLOAT, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_FLOAT, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("float")), t.getTypeName());
t = ::cppu::UnoType< double >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_DOUBLE, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_DOUBLE, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("double")),
t.getTypeName());
t = ::cppu::UnoType< ::cppu::UnoCharType >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_CHAR, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_CHAR, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("char")), t.getTypeName());
t = ::cppu::UnoType< ::rtl::OUString >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_STRING, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_STRING, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("string")),
t.getTypeName());
t = ::cppu::UnoType< css::uno::Type >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_TYPE, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_TYPE, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("type")), t.getTypeName());
t = ::cppu::UnoType< css::uno::Any >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_ANY, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_ANY, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("any")), t.getTypeName());
t = ::cppu::UnoType< ::cppu::UnoSequenceType< ::sal_Int8 > >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_SEQUENCE, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SEQUENCE, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[]byte")),
t.getTypeName());
@@ -171,19 +173,19 @@ void Test::testUnoType() {
::cppu::UnoType< css::uno::Sequence< ::sal_Int8 > >::get() == t);
t = ::cppu::UnoType<
::cppu::UnoSequenceType< ::cppu::UnoUnsignedShortType > >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_SEQUENCE, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SEQUENCE, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[]unsigned short")),
t.getTypeName());
t = ::cppu::UnoType<
::cppu::UnoSequenceType< ::cppu::UnoCharType > >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_SEQUENCE, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SEQUENCE, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[]char")),
t.getTypeName());
t = ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType<
::sal_Int8 > > >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_SEQUENCE, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SEQUENCE, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[][]byte")),
t.getTypeName());
@@ -192,31 +194,31 @@ void Test::testUnoType() {
css::uno::Sequence< css::uno::Sequence< ::sal_Int8 > > >::get() == t);
t = ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType<
::cppu::UnoUnsignedShortType > > >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_SEQUENCE, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SEQUENCE, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[][]unsigned short")),
t.getTypeName());
t = ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoSequenceType<
::cppu::UnoCharType > > >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_SEQUENCE, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_SEQUENCE, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("[][]char")),
t.getTypeName());
t = ::cppu::UnoType< css::uno::TypeClass >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_ENUM, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_ENUM, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.TypeClass")),
t.getTypeName());
t = ::cppu::UnoType< css::lang::EventObject >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_STRUCT, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_STRUCT, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.EventObject")),
t.getTypeName());
CPPUNIT_ASSERT(::cppu::UnoType< DerivedStruct1 >::get() == t);
t = ::cppu::UnoType< css::beans::PropertyChangeEvent >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_STRUCT, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_STRUCT, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(
@@ -226,20 +228,20 @@ void Test::testUnoType() {
CPPUNIT_ASSERT(::cppu::UnoType< DerivedStruct2 >::get() == t);
#endif
t = ::cppu::UnoType< css::beans::Optional< ::sal_Int8 > >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_STRUCT, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_STRUCT, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("com.sun.star.beans.Optional<byte>")),
t.getTypeName());
t = ::cppu::UnoType< css::uno::Exception >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_EXCEPTION, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_EXCEPTION, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.Exception")),
t.getTypeName());
CPPUNIT_ASSERT(::cppu::UnoType< DerivedException1 >::get() == t);
t = ::cppu::UnoType< css::uno::RuntimeException >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_EXCEPTION, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_EXCEPTION, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException")),
@@ -248,7 +250,7 @@ void Test::testUnoType() {
CPPUNIT_ASSERT(::cppu::UnoType< DerivedException2 >::get() == t);
#endif
t = ::cppu::UnoType< css::uno::XInterface >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_INTERFACE, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_INTERFACE, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XInterface")),
@@ -261,7 +263,7 @@ void Test::testUnoType() {
::cppu::UnoType< css::uno::Reference< DerivedInterface1 > >::get() ==
t);
t = ::cppu::UnoType< css::uno::XComponentContext >::get();
- CPPUNIT_ASSERT_EQUAL(css::uno::TypeClass_INTERFACE, t.getTypeClass());
+ CPPUNIT_ASSERT_EQUAL(+css::uno::TypeClass_INTERFACE, +t.getTypeClass());
CPPUNIT_ASSERT_EQUAL(
::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.XComponentContext")),