[Libreoffice-commits] core.git: editeng/qa

Stephan Bergmann sbergman at redhat.com
Tue Sep 20 09:22:22 UTC 2016


 editeng/qa/unit/core-test.cxx |   16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

New commits:
commit 61794421b1b77bd4211e82f4f9642b310aefdd41
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Sep 20 11:20:31 2016 +0200

    Related cid#1371287: Improve code to not depend on missing move assignment
    
    Change-Id: I4c03ad08078e25ea7f7d754e6eaa587da7984c9d

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 14f06fe..50ae50b 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -27,7 +27,6 @@
 #include "editeng/editobj.hxx"
 #include "editeng/flditem.hxx"
 #include "svl/srchitem.hxx"
-#include "rtl/strbuf.hxx"
 
 #include <com/sun/star/text/textfield/Type.hpp>
 
@@ -429,15 +428,12 @@ void Test::testHyperlinkSearch()
         sal_Int32 nEnd = aTrickyOnes[n].mnEnd;
         pNode->UnExpandPositions(nStart,nEnd);
 
-        rtl::OStringBuffer aBuf;
-        aBuf = "bound check start is ";
-        aBuf.append(nStart).append(" but should be ").append(aTrickyOnes[n].mnNewStart);
-        aBuf.append(" in row ").append((sal_Int32)n);
-        CPPUNIT_ASSERT_MESSAGE(aBuf.getStr(), nStart == aTrickyOnes[n].mnNewStart);
-        aBuf = "bound check end is ";
-        aBuf.append(nEnd).append(" but should be ").append(aTrickyOnes[n].mnNewEnd);
-        aBuf.append(" in row ").append((sal_Int32)n);
-        CPPUNIT_ASSERT_MESSAGE(aBuf.getStr(), nEnd == aTrickyOnes[n].mnNewEnd);
+        CPPUNIT_ASSERT_EQUAL_MESSAGE(
+            OString("in row " + OString::number(n)).getStr(),
+            aTrickyOnes[n].mnNewStart, nStart);
+        CPPUNIT_ASSERT_EQUAL_MESSAGE(
+            OString("in row " + OString::number(n)).getStr(),
+            aTrickyOnes[n].mnNewEnd, nEnd);
     }
 
     SvxSearchItem aItem(1); //SID_SEARCH_ITEM);


More information about the Libreoffice-commits mailing list