Kaydet (Commit) 6007cdaa authored tarafından Miklos Vajna's avatar Miklos Vajna

CppunitTest_sc_autoformatobj: fix read of value vs content of value

As far as I see the old qadevOOo/runner/lib/MultiPropertyTest.java
didn't assert the content of the property value (only avoided the set of
the property if the value was null or void), the new C++ version asserts
both the type and the value. Asserting the type is probably a good
thing, but asserting the value is problematic, at least the test failed
for me without these tweaks.

Change-Id: I688486025e6118ad4c8907de6cb2629dd008f8fd
Reviewed-on: https://gerrit.libreoffice.org/47475Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst cef62714
...@@ -28,8 +28,8 @@ void TableAutoFormat::testTableAutoFormatProperties() ...@@ -28,8 +28,8 @@ void TableAutoFormat::testTableAutoFormatProperties()
propName = "IncludeFont"; propName = "IncludeFont";
bool aIncludeFont = false; bool aIncludeFont = false;
CPPUNIT_ASSERT(xTableAutoFormat->getPropertyValue(propName) >>= aIncludeFont); CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeFont",
CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeFont", aIncludeFont); xTableAutoFormat->getPropertyValue(propName) >>= aIncludeFont);
aNewValue <<= false; aNewValue <<= false;
xTableAutoFormat->setPropertyValue(propName, aNewValue); xTableAutoFormat->setPropertyValue(propName, aNewValue);
...@@ -38,8 +38,8 @@ void TableAutoFormat::testTableAutoFormatProperties() ...@@ -38,8 +38,8 @@ void TableAutoFormat::testTableAutoFormatProperties()
propName = "IncludeJustify"; propName = "IncludeJustify";
bool aIncludeJustify = false; bool aIncludeJustify = false;
CPPUNIT_ASSERT(xTableAutoFormat->getPropertyValue(propName) >>= aIncludeJustify); CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeJustify",
CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeJustify", aIncludeJustify); xTableAutoFormat->getPropertyValue(propName) >>= aIncludeJustify);
aNewValue <<= false; aNewValue <<= false;
xTableAutoFormat->setPropertyValue(propName, aNewValue); xTableAutoFormat->setPropertyValue(propName, aNewValue);
...@@ -48,8 +48,8 @@ void TableAutoFormat::testTableAutoFormatProperties() ...@@ -48,8 +48,8 @@ void TableAutoFormat::testTableAutoFormatProperties()
propName = "IncludeBorder"; propName = "IncludeBorder";
bool aIncludeBorder = false; bool aIncludeBorder = false;
CPPUNIT_ASSERT(xTableAutoFormat->getPropertyValue(propName) >>= aIncludeBorder); CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeBorder",
CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeBorder", aIncludeBorder); xTableAutoFormat->getPropertyValue(propName) >>= aIncludeBorder);
aNewValue <<= false; aNewValue <<= false;
xTableAutoFormat->setPropertyValue(propName, aNewValue); xTableAutoFormat->setPropertyValue(propName, aNewValue);
...@@ -58,8 +58,8 @@ void TableAutoFormat::testTableAutoFormatProperties() ...@@ -58,8 +58,8 @@ void TableAutoFormat::testTableAutoFormatProperties()
propName = "IncludeBackground"; propName = "IncludeBackground";
bool aIncludeBackground = false; bool aIncludeBackground = false;
CPPUNIT_ASSERT(xTableAutoFormat->getPropertyValue(propName) >>= aIncludeBackground); CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeBackground",
CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeBackground", aIncludeBackground); xTableAutoFormat->getPropertyValue(propName) >>= aIncludeBackground);
aNewValue <<= false; aNewValue <<= false;
xTableAutoFormat->setPropertyValue(propName, aNewValue); xTableAutoFormat->setPropertyValue(propName, aNewValue);
...@@ -68,9 +68,8 @@ void TableAutoFormat::testTableAutoFormatProperties() ...@@ -68,9 +68,8 @@ void TableAutoFormat::testTableAutoFormatProperties()
propName = "IncludeNumberFormat"; propName = "IncludeNumberFormat";
bool aIncludeNumberFormat = false; bool aIncludeNumberFormat = false;
CPPUNIT_ASSERT(xTableAutoFormat->getPropertyValue(propName) >>= aIncludeNumberFormat);
CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeNumberFormat", CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeNumberFormat",
aIncludeNumberFormat); xTableAutoFormat->getPropertyValue(propName) >>= aIncludeNumberFormat);
aNewValue <<= false; aNewValue <<= false;
xTableAutoFormat->setPropertyValue(propName, aNewValue); xTableAutoFormat->setPropertyValue(propName, aNewValue);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment