summaryrefslogtreecommitdiff
path: root/sal/qa/systools/test_comtools.cxx
diff options
context:
space:
mode:
authorAndrés Maldonado <amaldonado@linagora.com>2019-02-21 15:19:52 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-02-22 13:36:15 +0100
commitdb8a2a567087cb65ca420bfd582ea2c8c24fcd7b (patch)
tree984641c89db5470e6bd7227862c2459ee70c6357 /sal/qa/systools/test_comtools.cxx
parentb87f3dc3c54b0a070da97406230781c19834e25a (diff)
tdf#39625 make sal/qa/systools/test_comtools.cxx work with CppUnit
Change-Id: If467a13b03303656e51474b3ebd384db8782ed9b Reviewed-on: https://gerrit.libreoffice.org/68156 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal/qa/systools/test_comtools.cxx')
-rw-r--r--sal/qa/systools/test_comtools.cxx15
1 files changed, 6 insertions, 9 deletions
diff --git a/sal/qa/systools/test_comtools.cxx b/sal/qa/systools/test_comtools.cxx
index d4d4db492403..42e5215d729d 100644
--- a/sal/qa/systools/test_comtools.cxx
+++ b/sal/qa/systools/test_comtools.cxx
@@ -17,9 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-// autogenerated file with codegen.pl
-
-#include <testshl/simpleheader.hxx>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/plugin/TestPlugIn.h>
#include <systools/win32/comtools.hxx>
class COMObject : public IUnknown
@@ -186,7 +185,7 @@ namespace test_comtools
sal::systools::COMReference<IUnknown> r2 = r1.QueryInterface<IUnknown>(IID_IUnknown);
CPPUNIT_ASSERT_MESSAGE("Wrong reference count, 2 is expected", reinterpret_cast<COMObject*>(r2.get())->GetRefCount() == 2);
}
- catch(const sal::systools::ComError& ex)
+ catch(const sal::systools::ComError&)
{
CPPUNIT_ASSERT_MESSAGE("Exception should not have been thrown", false);
}
@@ -199,7 +198,7 @@ namespace test_comtools
sal::systools::COMReference<IUnknown> r1 = comObjectSource();
sal::systools::COMReference<IPersistFile> r2 = r1.QueryInterface<IPersistFile>(IID_IPersistFile);
}
- catch(const sal::systools::ComError& ex)
+ catch(const sal::systools::ComError&)
{
return;
}
@@ -227,12 +226,10 @@ namespace test_comtools
CPPUNIT_TEST_SUITE_END();
};
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(test_comtools::test_COMReference, "test_comtools");
+CPPUNIT_TEST_SUITE_REGISTRATION(test_comtools::test_COMReference);
} // namespace rtl_OUString
-// this macro creates an empty function, which will called by the RegisterAllFunctions()
-// to let the user the possibility to also register some functions by hand.
-NOADDITIONAL;
+CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */