summaryrefslogtreecommitdiff
path: root/cppu/qa
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-05-13 23:19:08 +0200
committerJulien Nabet <serval2412@yahoo.fr>2014-05-13 23:20:26 +0200
commit036a660a86c225992c7cab083073374c40b1f366 (patch)
tree6271d26cc317e682a471d6c4a787f47740af680b /cppu/qa
parente1f0d790832098a7f8b323ab04809b6b55ade3d9 (diff)
Prefer cppu::UnoType<T>::get() to ::getCppuType((T*)0) part11
Change-Id: Ibe0a1006aba2b6cbd87c0bd6ca3acbf9ba7b0fbe
Diffstat (limited to 'cppu/qa')
-rw-r--r--cppu/qa/test_unotype.cxx30
1 files changed, 14 insertions, 16 deletions
diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx
index 9a3e89704eb2..bbea20099e15 100644
--- a/cppu/qa/test_unotype.cxx
+++ b/cppu/qa/test_unotype.cxx
@@ -282,25 +282,25 @@ void Test::testGetTypeFavourUnsigned() {
::cppu::UnoType< bool >::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< bool * >(0)) ==
- ::getCppuType(static_cast< bool * >(0)));
+ ::cppu::UnoType<bool>::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< sal_Bool * >(0)) ==
::cppu::UnoType< bool >::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< sal_Bool * >(0)) ==
- ::getCppuType(static_cast< sal_Bool * >(0)));
+ ::cppu::UnoType<sal_Bool>::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int8 * >(0)) ==
::cppu::UnoType< ::sal_Int8 >::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int8 * >(0)) ==
- ::getCppuType(static_cast< ::sal_Int8 * >(0)));
+ ::cppu::UnoType<sal_Int8>::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int16 * >(0)) ==
::cppu::UnoType< ::sal_Int16 >::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int16 * >(0)) ==
- ::getCppuType(static_cast< ::sal_Int16 * >(0)));
+ ::cppu::UnoType<sal_Int16>::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(
static_cast< ::cppu::UnoUnsignedShortType * >(0)) ==
@@ -316,19 +316,19 @@ void Test::testGetTypeFavourUnsigned() {
::cppu::UnoType< ::sal_Int32 >::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int32 * >(0)) ==
- ::getCppuType(static_cast< ::sal_Int32 * >(0)));
+ ::cppu::UnoType<sal_Int32>::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< ::sal_uInt32 * >(0)) ==
::cppu::UnoType< ::sal_uInt32 >::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< ::sal_uInt32 * >(0)) ==
- ::getCppuType(static_cast< ::sal_uInt32 * >(0)));
+ ::cppu::UnoType<sal_uInt32>::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int64 * >(0)) ==
::cppu::UnoType< ::sal_Int64 >::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< ::sal_Int64 * >(0)) ==
- ::getCppuType(static_cast< ::sal_Int64 * >(0)));
+ ::cppu::UnoType<sal_Int64>::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< ::sal_uInt64 * >(0)) ==
::cppu::UnoType< ::sal_uInt64 >::get());
@@ -340,13 +340,13 @@ void Test::testGetTypeFavourUnsigned() {
::cppu::UnoType< float >::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< float * >(0)) ==
- ::getCppuType(static_cast< float * >(0)));
+ ::cppu::UnoType<float>::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< double * >(0)) ==
::cppu::UnoType< double >::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< double * >(0)) ==
- ::getCppuType(static_cast< double * >(0)));
+ ::cppu::UnoType<double>::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(
static_cast< ::cppu::UnoCharType * >(0)) ==
@@ -362,7 +362,7 @@ void Test::testGetTypeFavourUnsigned() {
::cppu::UnoType< ::rtl::OUString >::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< ::rtl::OUString * >(0)) ==
- ::getCppuType(static_cast< ::rtl::OUString * >(0)));
+ ::cppu::UnoType<rtl::OUString>::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< css::uno::Type * >(0)) ==
::cppu::UnoType< css::uno::Type >::get());
@@ -446,7 +446,7 @@ void Test::testGetTypeFavourUnsigned() {
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(
static_cast< css::lang::EventObject * >(0)) ==
- ::getCppuType(static_cast< css::lang::EventObject * >(0)));
+ ::cppu::UnoType<css::lang::EventObject>::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< DerivedStruct1 * >(0)) ==
::cppu::UnoType< css::lang::EventObject >::get());
@@ -460,7 +460,7 @@ void Test::testGetTypeFavourUnsigned() {
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(
static_cast< css::beans::PropertyChangeEvent * >(0)) ==
- ::getCppuType(static_cast< css::beans::PropertyChangeEvent * >(0)));
+ ::cppu::UnoType<css::beans::PropertyChangeEvent>::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< DerivedStruct2 * >(0)) ==
::cppu::UnoType< css::beans::PropertyChangeEvent >::get());
@@ -482,7 +482,7 @@ void Test::testGetTypeFavourUnsigned() {
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(
static_cast< css::uno::Exception * >(0)) ==
- ::getCppuType(static_cast< css::uno::Exception * >(0)));
+ ::cppu::UnoType<css::uno::Exception>::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< DerivedException1 * >(0)) ==
::cppu::UnoType< css::uno::Exception >::get());
@@ -536,9 +536,7 @@ void Test::testGetTypeFavourUnsigned() {
::cppu::getTypeFavourUnsigned(
static_cast<
css::uno::Reference< css::uno::XComponentContext > * >(0)) ==
- ::getCppuType(
- static_cast<
- css::uno::Reference< css::uno::XComponentContext > * >(0)));
+ cppu::UnoType<css::uno::XComponentContext>::get());
CPPUNIT_ASSERT(
::cppu::getTypeFavourUnsigned(static_cast< DerivedInterface2 * >(0)) ==
::cppu::UnoType< css::uno::XComponentContext >::get());