summaryrefslogtreecommitdiff
path: root/comphelper/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-20 13:39:52 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-20 13:39:52 +0100
commitb8793748b0eaaa3fe405587fcb2a3021adab833b (patch)
tree39b683691a8b8089831939a3a84ba1d62d614cb5 /comphelper/qa
parente3990370f832c8a69d1b6b22ec315dc0616d5535 (diff)
Seems more natural to pass a homogenous list by initializer_list
...than by template parameter pack (even if that requires using ServiceDecl*, as initializer_list cannot take reference types) Change-Id: Ia986201b52d8daedfe925f132ebc79bc2c0ba378
Diffstat (limited to 'comphelper/qa')
-rw-r--r--comphelper/qa/unit/variadictemplates.cxx50
1 files changed, 0 insertions, 50 deletions
diff --git a/comphelper/qa/unit/variadictemplates.cxx b/comphelper/qa/unit/variadictemplates.cxx
index 78f3bd7c3a42..4b45f1767606 100644
--- a/comphelper/qa/unit/variadictemplates.cxx
+++ b/comphelper/qa/unit/variadictemplates.cxx
@@ -10,7 +10,6 @@
#include <boost/optional.hpp>
#include <sal/types.h>
#include <comphelper/unwrapargs.hxx>
-#include <comphelper/servicedecl.hxx>
#include "cppunit/TestAssert.h"
#include "cppunit/TestFixture.h"
#include "cppunit/extensions/HelperMacros.h"
@@ -22,11 +21,9 @@ class VariadicTemplatesTest : public CppUnit::TestFixture
{
public:
void testUnwrapArgs();
- void testServiceDecl();
CPPUNIT_TEST_SUITE(VariadicTemplatesTest);
CPPUNIT_TEST(testUnwrapArgs);
- CPPUNIT_TEST(testServiceDecl);
CPPUNIT_TEST_SUITE_END();
};
@@ -90,19 +87,6 @@ inline void unwrapArgsBaseline(
::detail::extract( seq, 4, v4, xErrorContext );
}
-struct DummyStruct {
- sal_uInt32 m_x;
-
- DummyStruct( sal_uInt32 x ): m_x( x ) { }
- DummyStruct() : m_x( 0 ) { }
-
- void* getFactory( const char* ) const {
- if( m_x == 42 )
- return new int( m_x );
- return nullptr;
- }
-};
-
}
void VariadicTemplatesTest::testUnwrapArgs() {
@@ -193,40 +177,6 @@ void VariadicTemplatesTest::testUnwrapArgs() {
}
}
-void VariadicTemplatesTest::testServiceDecl() {
- DummyStruct dummy1( 42 );
- DummyStruct dummy2;
- DummyStruct dummy3;
- void* pRet = ::comphelper::service_decl::component_getFactoryHelper( "test",
- dummy3,
- dummy2,
- dummy1 );
-
- CPPUNIT_ASSERT_MESSAGE( "pRet != 0",
- pRet != nullptr );
-
- sal_uInt32* pnRet = static_cast< sal_uInt32* >( pRet );
-
- CPPUNIT_ASSERT_MESSAGE( "*pnRet == 42",
- *pnRet == 42 );
- delete pnRet;
-
- pRet = ::comphelper::service_decl::component_getFactoryHelper( "test",
- dummy1,
- dummy2,
- dummy2 );
-
- CPPUNIT_ASSERT_MESSAGE( "pRet != nullptr",
- pRet != nullptr );
-
- pnRet = static_cast< sal_uInt32* >( pRet );
-
- CPPUNIT_ASSERT_MESSAGE( "*pnRet == 42",
- *pnRet == 42 );
-
- delete pnRet;
-}
-
CPPUNIT_TEST_SUITE_REGISTRATION(VariadicTemplatesTest);
CPPUNIT_PLUGIN_IMPLEMENT();