summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2018-05-08 19:48:10 +0900
committerTomaž Vajngerl <quikee@gmail.com>2018-05-09 02:03:43 +0200
commit2af7daa18467cc7c3f4f435c58cd19ee682f754f (patch)
tree14bbb90b8c4707d03cdc6833afe32ca087a76072 /include
parent711c2e49dd3c51877263148267344e2eb4ca7c0d (diff)
extend property tester - add optional variants and color
Change-Id: Iad72470b5f1fc5405673d2d7781bc59002a3a44a Reviewed-on: https://gerrit.libreoffice.org/53988 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/test/unoapi_property_testers.hxx34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/test/unoapi_property_testers.hxx b/include/test/unoapi_property_testers.hxx
index fce19763e21f..f45b772b86e3 100644
--- a/include/test/unoapi_property_testers.hxx
+++ b/include/test/unoapi_property_testers.hxx
@@ -12,6 +12,7 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/util/Color.hpp>
#include <sal/config.h>
#include <test/testdllapi.hxx>
@@ -26,6 +27,16 @@ namespace apitest
void OOO_DLLPUBLIC_TEST testBooleanProperty(
css::uno::Reference<css::beans::XPropertySet> const& xPropertySet, const OUString& name);
+/** @brief Tester for optional property type 'boolean' of a @see com::sun::star::beans::XPropertySet.
+ *
+ * Pass the test also if the property doesn't exists (throws a com::sun::star::beans::UnknownPropertyException)
+ *
+ * @param xPropertySet The property set, which contains the property to test against.
+ * @param name Name of property to test.
+ */
+void OOO_DLLPUBLIC_TEST testBooleanOptionalProperty(
+ css::uno::Reference<css::beans::XPropertySet> const& xPropertySet, const OUString& name);
+
/** @brief Tester for read-only property type 'boolean' of a @see com::sun::star::beans::XPropertySet.
*
* @param xPropertySet The property set, which contains the property to test against.
@@ -104,6 +115,18 @@ void OOO_DLLPUBLIC_TEST
testStringProperty(css::uno::Reference<css::beans::XPropertySet> const& xPropertySet,
const OUString& name, const OUString& rValue);
+/** @brief Tester for optional property type 'string' of a @see com::sun::star::beans::XPropertySet.
+ *
+ * Pass the test also if the property doesn't exists (throws a com::sun::star::beans::UnknownPropertyException)
+ *
+ * @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
+testStringOptionalProperty(css::uno::Reference<css::beans::XPropertySet> const& xPropertySet,
+ const OUString& name, const OUString& rValue = OUString("StringValue"));
+
/** @brief Tester for read-only property type 'string' of a @see com::sun::star::beans::XPropertySet.
*
* @param xPropertySet The property set, which contains the property to test against.
@@ -113,6 +136,17 @@ testStringProperty(css::uno::Reference<css::beans::XPropertySet> const& xPropert
void OOO_DLLPUBLIC_TEST
testStringReadonlyProperty(css::uno::Reference<css::beans::XPropertySet> const& xPropertySet,
const OUString& name, const OUString& rValue);
+
+/** @brief Tester for property type com::sun::star::util::Color 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 testColorProperty(
+ css::uno::Reference<css::beans::XPropertySet> const& xPropertySet, const OUString& name,
+ const css::util::Color& rValue = css::util::Color(0x12345678));
+
} // namespace apitest
#endif // INCLUDED_TEST_INC_UNOAPIPROPERTYTESTERS_HXX