summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-09-20 11:20:31 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-09-20 11:20:31 +0200
commit61794421b1b77bd4211e82f4f9642b310aefdd41 (patch)
treeb685a286eef4f82eb6ac6b32bdb51ba6484e87e7 /editeng
parente27a0ec89f6d13be0ddf4d68b844a78f939f7bf9 (diff)
Related cid#1371287: Improve code to not depend on missing move assignment
Change-Id: I4c03ad08078e25ea7f7d754e6eaa587da7984c9d
Diffstat (limited to 'editeng')
-rw-r--r--editeng/qa/unit/core-test.cxx16
1 files changed, 6 insertions, 10 deletions
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 14f06fe3293e..50ae50b57b11 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);