test/source/sheet/tableautoformat.cxx |   19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

New commits:
commit 6007cdaabe1694ca8804ba816dbd87885dd3d8ac
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Fri Jan 5 15:38:10 2018 +0100

    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 <c...@libreoffice.org>
    Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

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);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to