summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/source/unoapi_property_testers.cxx26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/source/unoapi_property_testers.cxx b/test/source/unoapi_property_testers.cxx
index 75eed2c9a70b..823972d25afd 100644
--- a/test/source/unoapi_property_testers.cxx
+++ b/test/source/unoapi_property_testers.cxx
@@ -127,6 +127,19 @@ void testLongProperty(uno::Reference<beans::XPropertySet> const& xPropertySet, c
CPPUNIT_ASSERT_EQUAL_MESSAGE(msgSet.getStr(), nValue, nPropertySet);
}
+void testLongOptionalProperty(uno::Reference<beans::XPropertySet> const& xPropertySet,
+ const OUString& rName, const sal_Int32& rValue)
+{
+ try
+ {
+ testLongProperty(xPropertySet, rName, rValue);
+ }
+ catch (const css::beans::UnknownPropertyException& /*ex*/)
+ {
+ // ignore if the property is unknown as it is optional
+ }
+}
+
void testLongReadonlyProperty(uno::Reference<beans::XPropertySet> const& xPropertySet,
const OUString& name, const sal_Int32& nValue)
{
@@ -166,6 +179,19 @@ void testShortProperty(uno::Reference<beans::XPropertySet> const& xPropertySet,
CPPUNIT_ASSERT_EQUAL_MESSAGE(msgSet.getStr(), nValue, nPropertySet);
}
+void testShortOptionalProperty(uno::Reference<beans::XPropertySet> const& xPropertySet,
+ const OUString& rName, const sal_Int16& rValue)
+{
+ try
+ {
+ testShortProperty(xPropertySet, rName, rValue);
+ }
+ catch (const css::beans::UnknownPropertyException& /*ex*/)
+ {
+ // ignore if the property is unknown as it is optional
+ }
+}
+
void testShortReadonlyProperty(uno::Reference<beans::XPropertySet> const& xPropertySet,
const OUString& name, const sal_Int16& nValue)
{