Kaydet (Commit) 51ac50b5 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Fix and enable CppunitTest_comphelper_syntaxhighlight_test

Change-Id: I2b2aa5f5afdbf58ec3ac2447db370bcb7d1778c0
üst 7a06928b
......@@ -28,6 +28,7 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,comphelper,\
))
$(eval $(call gb_Module_add_check_targets,comphelper,\
CppunitTest_comphelper_syntaxhighlight_test \
CppunitTest_comphelper_test \
))
......
......@@ -36,14 +36,14 @@ void SyntaxHighlightTest::testBasicString()
std::vector<HighlightPortion> aPortions;
aHighlighter.getHighlightPortions( 0, aBasicString, aPortions );
// check that all strings are valid
sal_Int32 prevEnd = 0;
for(std::vector<HighlightPortion>::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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment