diff options
author | Jens Carl <j.carl43@gmx.de> | 2018-03-14 08:31:03 +0000 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2018-03-18 05:53:07 +0100 |
commit | c671b277275d2173b8235bcda1aa3f17dbe6deb5 (patch) | |
tree | 25aceb2f59e7ca572d0a1785371902c8dfed09b1 /include/test | |
parent | 6f487baba0a63e775a20911551b83feb82a327f5 (diff) |
Create UNO API property testers for common types
Create UNO API property testers for common, so it's possible to share/use
them between all the UNO API service property tests.
Testers are available for the types 'boolean', 'long', 'short', and
'string'.
Change-Id: Ia36dba98c774695b3ba6ac9d9917af9fb20efdba
Reviewed-on: https://gerrit.libreoffice.org/51259
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
Diffstat (limited to 'include/test')
-rw-r--r-- | include/test/unoapi_property_testers.hxx | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/include/test/unoapi_property_testers.hxx b/include/test/unoapi_property_testers.hxx new file mode 100644 index 000000000000..c0c7cc86dd70 --- /dev/null +++ b/include/test/unoapi_property_testers.hxx @@ -0,0 +1,61 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_TEST_SHEET_UNOAPIPROPERTYHELPER_HXX +#define INCLUDED_TEST_SHEET_UNOAPIPROPERTYHELPER_HXX + +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/uno/Reference.hxx> + +#include <sal/config.h> +#include <test/testdllapi.hxx> + +namespace apitest +{ +/** @brief Tester for test property type 'boolean' of a @see com::sun::star::beans::XPropertySet. + * + * @param xPropertySet The property set, which contains the property to test against. + * @param name Name of property to test. + */ +void OOO_DLLPUBLIC_TEST testBooleanProperty( + css::uno::Reference<css::beans::XPropertySet>& xPropertySet, const OUString& name); + +/** @brief Tester for test property type 'long' of a @see com::sun::star::beans::XPropertySet. + * + * @param xPropertySet The property set, which contains the property to test against. + * @param name Name of property to test. + * @param nValue Value to use when setting a new value. + */ +void OOO_DLLPUBLIC_TEST +testLongProperty(css::uno::Reference<css::beans::XPropertySet>& xPropertySet, const OUString& name, + const sal_Int32& nValue); + +/** @brief Tester for property type 'short' of a @see com::sun::star::beans::XPropertySet. + * + * @param xPropertySet The property set, which contains the property to test against. + * @param name Name of property to test. + * @param nValue Value to use when setting a new value. + */ +void OOO_DLLPUBLIC_TEST +testShortProperty(css::uno::Reference<css::beans::XPropertySet>& xPropertySet, const OUString& name, + const sal_Int16& nValue); + +/** @brief Tester for property type 'string' of a @see com::sun::star::beans::XPropertySet. + * + * @param xPropertySet The property set, which contains the property to test against. + * @param name Name of property to test. + * @param rValue Value to use when setting a new value. + */ +void OOO_DLLPUBLIC_TEST +testStringProperty(css::uno::Reference<css::beans::XPropertySet>& xPropertySet, + const OUString& name, const OUString& rValue); +} +#endif // INCLUDED_TEST_SHEET_UNOAPIPROPERTYHELPER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |