summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-10-01 09:53:55 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-10-01 10:27:56 +0100
commit05528a63000ff9d41038db55a0e43a5d0588ac44 (patch)
tree13f816c5eebfd8a1a47effb681a20cecb76bc186 /i18npool
parenta2765c02cd44a7f4ab7d30716d8fe7c1811aa3a6 (diff)
silence coverity#1373441 Side effect in assertion
Change-Id: I1cf7b7d20a0b567c7363c5a9abc5bf1195b57262
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/qa/cppunit/test_breakiterator.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx
index dd3e85007403..1bd2b3dda737 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -339,7 +339,8 @@ void TestBreakIterator::testWordBoundaries()
{
CPPUNIT_ASSERT(i < SAL_N_ELEMENTS(aDoublePositions));
nPos = m_xBreak->nextWord(aTest, nPos, aLocale, i18n::WordType::ANYWORD_IGNOREWHITESPACES).startPos;
- CPPUNIT_ASSERT_EQUAL(aDoublePositions[i++], nPos);
+ CPPUNIT_ASSERT_EQUAL(aDoublePositions[i], nPos);
+ ++i;
}
while (nPos < aTest.getLength());
nPos = aTest.getLength();
@@ -347,7 +348,8 @@ void TestBreakIterator::testWordBoundaries()
do
{
nPos = m_xBreak->previousWord(aTest, nPos, aLocale, i18n::WordType::ANYWORD_IGNOREWHITESPACES).startPos;
- CPPUNIT_ASSERT_EQUAL(aDoublePositions[--i], nPos);
+ --i;
+ CPPUNIT_ASSERT_EQUAL(aDoublePositions[i], nPos);
}
while (nPos > 0);
}