diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-10-01 09:53:55 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-10-01 10:27:56 +0100 |
commit | 05528a63000ff9d41038db55a0e43a5d0588ac44 (patch) | |
tree | 13f816c5eebfd8a1a47effb681a20cecb76bc186 /i18npool/qa | |
parent | a2765c02cd44a7f4ab7d30716d8fe7c1811aa3a6 (diff) |
silence coverity#1373441 Side effect in assertion
Change-Id: I1cf7b7d20a0b567c7363c5a9abc5bf1195b57262
Diffstat (limited to 'i18npool/qa')
-rw-r--r-- | i18npool/qa/cppunit/test_breakiterator.cxx | 6 |
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); } |