summaryrefslogtreecommitdiff
path: root/comphelper/qa
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@libreoffice.org>2013-10-27 15:15:30 +0100
committerArnaud Versini <arnaud.versini@libreoffice.org>2013-10-27 16:07:16 +0000
commita79cb836b951eb2492e43aadd2ee672b9b67b914 (patch)
tree7df76c41a61ed2a249a2626a2a5dc0ee195beab7 /comphelper/qa
parent591827c9ad0bec8b608bec63942aa7daf87dc5a0 (diff)
COMPHELPER: Allow empty comments in SyntaxHighlight
Change-Id: I0f3d5673e28e34ed3921c930aca48f3d7574b064 Reviewed-on: https://gerrit.libreoffice.org/6450 Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org> Tested-by: Arnaud Versini <arnaud.versini@libreoffice.org>
Diffstat (limited to 'comphelper/qa')
-rw-r--r--comphelper/qa/unit/syntaxhighlighttest.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/comphelper/qa/unit/syntaxhighlighttest.cxx b/comphelper/qa/unit/syntaxhighlighttest.cxx
index 8fab0677d4eb..d26b8556681d 100644
--- a/comphelper/qa/unit/syntaxhighlighttest.cxx
+++ b/comphelper/qa/unit/syntaxhighlighttest.cxx
@@ -41,10 +41,11 @@ void SyntaxHighlightTest::testBasicString()
aPortions.begin(), itrEnd = aPortions.end(); itr != itrEnd; ++itr)
{
CPPUNIT_ASSERT_EQUAL(prevEnd, itr->nBegin);
- CPPUNIT_ASSERT(itr->nBegin < itr->nEnd);
+ //The comment is empty, so empty zone
+ CPPUNIT_ASSERT(itr->nBegin <= itr->nEnd);
prevEnd = itr->nEnd;
}
- CPPUNIT_ASSERT_EQUAL(aBasicString.getLength(), prevEnd);
+ CPPUNIT_ASSERT_EQUAL(aBasicString.getLength() - 1, prevEnd);
}
CPPUNIT_TEST_SUITE_REGISTRATION(SyntaxHighlightTest);