diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-01-05 15:38:10 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-01-05 20:37:16 +0100 |
commit | 6007cdaabe1694ca8804ba816dbd87885dd3d8ac (patch) | |
tree | db6a9dd62442788da786df370d148692badecca3 /test | |
parent | cef6271497ad3fe74820b36d6387351b15a16519 (diff) |
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/47475
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'test')
-rw-r--r-- | test/source/sheet/tableautoformat.cxx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/test/source/sheet/tableautoformat.cxx b/test/source/sheet/tableautoformat.cxx index 28f98eb172f6..ed1424482cb6 100644 --- a/test/source/sheet/tableautoformat.cxx +++ b/test/source/sheet/tableautoformat.cxx @@ -28,8 +28,8 @@ void TableAutoFormat::testTableAutoFormatProperties() propName = "IncludeFont"; bool aIncludeFont = false; - CPPUNIT_ASSERT(xTableAutoFormat->getPropertyValue(propName) >>= aIncludeFont); - CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeFont", aIncludeFont); + CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeFont", + xTableAutoFormat->getPropertyValue(propName) >>= aIncludeFont); aNewValue <<= false; xTableAutoFormat->setPropertyValue(propName, aNewValue); @@ -38,8 +38,8 @@ void TableAutoFormat::testTableAutoFormatProperties() propName = "IncludeJustify"; bool aIncludeJustify = false; - CPPUNIT_ASSERT(xTableAutoFormat->getPropertyValue(propName) >>= aIncludeJustify); - CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeJustify", aIncludeJustify); + CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeJustify", + xTableAutoFormat->getPropertyValue(propName) >>= aIncludeJustify); aNewValue <<= false; xTableAutoFormat->setPropertyValue(propName, aNewValue); @@ -48,8 +48,8 @@ void TableAutoFormat::testTableAutoFormatProperties() propName = "IncludeBorder"; bool aIncludeBorder = false; - CPPUNIT_ASSERT(xTableAutoFormat->getPropertyValue(propName) >>= aIncludeBorder); - CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeBorder", aIncludeBorder); + CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeBorder", + xTableAutoFormat->getPropertyValue(propName) >>= aIncludeBorder); aNewValue <<= false; xTableAutoFormat->setPropertyValue(propName, aNewValue); @@ -58,8 +58,8 @@ void TableAutoFormat::testTableAutoFormatProperties() propName = "IncludeBackground"; bool aIncludeBackground = false; - CPPUNIT_ASSERT(xTableAutoFormat->getPropertyValue(propName) >>= aIncludeBackground); - CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeBackground", aIncludeBackground); + CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeBackground", + xTableAutoFormat->getPropertyValue(propName) >>= aIncludeBackground); aNewValue <<= false; xTableAutoFormat->setPropertyValue(propName, aNewValue); @@ -68,9 +68,8 @@ void TableAutoFormat::testTableAutoFormatProperties() propName = "IncludeNumberFormat"; bool aIncludeNumberFormat = false; - CPPUNIT_ASSERT(xTableAutoFormat->getPropertyValue(propName) >>= aIncludeNumberFormat); CPPUNIT_ASSERT_MESSAGE("Unable to get property value IncludeNumberFormat", - aIncludeNumberFormat); + xTableAutoFormat->getPropertyValue(propName) >>= aIncludeNumberFormat); aNewValue <<= false; xTableAutoFormat->setPropertyValue(propName, aNewValue); |