[Libreoffice-commits] .: Branch 'libreoffice-3-6' - i18npool/qa

Jan Holesovsky kendy at kemper.freedesktop.org
Fri Jul 13 03:28:41 PDT 2012


 i18npool/qa/cppunit/test_breakiterator.cxx |   11 +++++++++++
 1 file changed, 11 insertions(+)

New commits:
commit d22ec2d67e82ebc7723f018172911ff4e567c006
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Jul 13 11:10:45 2012 +0100

    skip khmer test on older 'broken' icu versions
    
    Change-Id: Iab813f5288af1f0e054c022c4e4a99b92c7ce1ce
    Signed-off-by: Jan Holesovsky <kendy at suse.cz>

diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx
index a8a050a..3a64c31 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -41,6 +41,8 @@
 #include <com/sun/star/i18n/WordType.hpp>
 #include <unotest/bootstrapfixturebase.hxx>
 
+#include <unicode/uvernum.h>
+
 #include <rtl/strbuf.hxx>
 #include <rtl/ustrbuf.hxx>
 
@@ -62,7 +64,9 @@ public:
 #if TODO
     void testNorthernThai();
 #endif
+#if (U_ICU_VERSION_MAJOR_NUM > 4)
     void testKhmer();
+#endif
 
     CPPUNIT_TEST_SUITE(TestBreakIterator);
     CPPUNIT_TEST(testLineBreaking);
@@ -73,7 +77,9 @@ public:
 #if TODO
     CPPUNIT_TEST(testNorthernThai);
 #endif
+#if (U_ICU_VERSION_MAJOR_NUM > 4)
     CPPUNIT_TEST(testKhmer);
+#endif
     CPPUNIT_TEST_SUITE_END();
 private:
     uno::Reference<i18n::XBreakIterator> m_xBreak;
@@ -346,8 +352,12 @@ void TestBreakIterator::testNorthernThai()
 }
 #endif
 
+#if (U_ICU_VERSION_MAJOR_NUM > 4)
 //A test to ensure that our khmer word boundary detection is useful
 //https://bugs.freedesktop.org/show_bug.cgi?id=52020
+//
+//icu doesn't have the Khmer word boundary dictionaries in <= 4.0.0 but does in
+//the current 49.x.y . Not sure which version first had them introduced.
 void TestBreakIterator::testKhmer()
 {
     lang::Locale aLocale;
@@ -367,6 +377,7 @@ void TestBreakIterator::testKhmer()
 
     CPPUNIT_ASSERT(aBounds.startPos == 3 && aBounds.endPos == 5);
 }
+#endif
 
 void TestBreakIterator::setUp()
 {


More information about the Libreoffice-commits mailing list