summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-05-08 11:10:21 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-05-08 11:12:28 -0400
commitdc0d9e802a5a243dda684cc670e4ef1de9853fc7 (patch)
tree16cfe34852b559180f12ae77b11cc1797c15d688
parent02cf8bf47252cdaeaed7179ebd002692065583d0 (diff)
Property writable test for util::DateTime & fixed a copy/paste error.
Change-Id: Iabfbe3f4df2c73ad9325bdc60e4ad71a5d1fda15
-rw-r--r--test/source/beans/xpropertyset.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/source/beans/xpropertyset.cxx b/test/source/beans/xpropertyset.cxx
index 96283d26fc22..387710226c9d 100644
--- a/test/source/beans/xpropertyset.cxx
+++ b/test/source/beans/xpropertyset.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/uno/Type.h>
#include <com/sun/star/beans/PropertyAttribute.hpp>
+#include <com/sun/star/util/DateTime.hpp>
#include <set>
@@ -92,7 +93,7 @@ void XPropertySet::testGetPropertyValue()
// Check writable properties.
for (size_t i = 0, n = maPropsToTest.normal.size(); i < n; ++i)
{
- bool bSuccess = getSinglePropertyValue(xPropSet, maPropsToTest.readonly[i]);
+ bool bSuccess = getSinglePropertyValue(xPropSet, maPropsToTest.normal[i]);
CPPUNIT_ASSERT(bSuccess);
}
}
@@ -169,6 +170,13 @@ bool XPropertySet::isPropertyValueChangeable(const rtl::OUString& rName)
rtl::OUString aNew = aOld + rtl::OUString("foo");
xPropSet->setPropertyValue(rName, makeAny(aNew));
}
+ else if (type == getCppuType<util::DateTime>())
+ {
+ // date time type
+ util::DateTime aDT = any.get<util::DateTime>();
+ aDT.Year += 1;
+ xPropSet->setPropertyValue(rName, makeAny(aDT));
+ }
else
{
CPPUNIT_ASSERT_MESSAGE("XPropertySet::isChangeable: unknown type in Any tested.", false);