diff options
-rw-r--r-- | include/test/lang/xserviceinfo.hxx | 11 | ||||
-rw-r--r-- | test/source/lang/xserviceinfo.cxx | 4 |
2 files changed, 11 insertions, 4 deletions
diff --git a/include/test/lang/xserviceinfo.hxx b/include/test/lang/xserviceinfo.hxx index 498e5ed8387f..86a92480d970 100644 --- a/include/test/lang/xserviceinfo.hxx +++ b/include/test/lang/xserviceinfo.hxx @@ -10,6 +10,8 @@ #ifndef INCLUDED_TEST_LANG_XSERVICEINFO_HXX #define INCLUDED_TEST_LANG_XSERVICEINFO_HXX +#include <vector> + #include <com/sun/star/uno/XInterface.hpp> #include <com/sun/star/uno/Reference.hxx> @@ -24,7 +26,12 @@ class OOO_DLLPUBLIC_TEST XServiceInfo public: XServiceInfo(const OUString& rImplName, const OUString& rServiceName) : m_aImplName(rImplName) - , m_aServiceName(rServiceName) + { + m_aServiceNames.push_back(rServiceName); + } + XServiceInfo(const OUString& rImplName, const std::vector<OUString> rServiceNames) + : m_aImplName(rImplName) + , m_aServiceNames(rServiceNames) { } @@ -39,7 +46,7 @@ protected: private: OUString const m_aImplName; - OUString const m_aServiceName; + std::vector<OUString> m_aServiceNames; }; } // namespace apitest diff --git a/test/source/lang/xserviceinfo.cxx b/test/source/lang/xserviceinfo.cxx index 9db9e4b1cbe3..3f7e6541fa85 100644 --- a/test/source/lang/xserviceinfo.cxx +++ b/test/source/lang/xserviceinfo.cxx @@ -18,7 +18,6 @@ #include <cppunit/extensions/HelperMacros.h> using namespace css; -using namespace css::uno; namespace apitest { @@ -41,7 +40,8 @@ void XServiceInfo::testSupportsService() { uno::Reference<lang::XServiceInfo> xSI(init(), uno::UNO_QUERY_THROW); - CPPUNIT_ASSERT(xSI->supportsService(m_aServiceName)); + for (const auto& aServiceName : m_aServiceNames) + CPPUNIT_ASSERT(xSI->supportsService(aServiceName)); } } // namespace apitest |