From 51ac50b538534f47af78379628460d29eb6589cf Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 23 Oct 2013 09:32:17 +0200 Subject: Fix and enable CppunitTest_comphelper_syntaxhighlight_test Change-Id: I2b2aa5f5afdbf58ec3ac2447db370bcb7d1778c0 --- comphelper/qa/unit/syntaxhighlighttest.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'comphelper/qa') diff --git a/comphelper/qa/unit/syntaxhighlighttest.cxx b/comphelper/qa/unit/syntaxhighlighttest.cxx index 244a1a09a553..830e233190cf 100644 --- a/comphelper/qa/unit/syntaxhighlighttest.cxx +++ b/comphelper/qa/unit/syntaxhighlighttest.cxx @@ -36,14 +36,14 @@ void SyntaxHighlightTest::testBasicString() std::vector aPortions; aHighlighter.getHighlightPortions( 0, aBasicString, aPortions ); - - // check that all strings are valid + sal_Int32 prevEnd = 0; for(std::vector::const_iterator itr = aPortions.begin(), itrEnd = aPortions.end(); itr != itrEnd; ++itr) { - CPPUNIT_ASSERT(itr->nBegin < aBasicString.getLength()); - //CPPUNIT_ASSERT(itr->nEnd < aBasicString.getLength()); + CPPUNIT_ASSERT_EQUAL(prevEnd, itr->nBegin); + prevEnd = itr->nEnd; } + CPPUNIT_ASSERT_EQUAL(aBasicString.getLength(), prevEnd); } CPPUNIT_TEST_SUITE_REGISTRATION(SyntaxHighlightTest); -- cgit