[Libreoffice-commits] core.git: i18npool/qa

Stephan Bergmann sbergman at redhat.com
Fri May 29 03:12:12 PDT 2015


 i18npool/qa/cppunit/test_breakiterator.cxx |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 8c8ba8df11eafa7ddb6e65b3c4f11faafb7b6403
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Fri May 29 12:09:20 2015 +0200

    Fix execution of testLao
    
    ...which had already been conditional on U_ICU_VERSION_MAJOR_NUM > 51, so
    452a06b70578eb83067c6c744cd97eebafc4003c "Activate unit test for Lao
    breakiterator support" should merely have extended that #if to the function
    declaration/definition in response to loplugin:unreffun, not unconditionally
    enabled it.
    
    Change-Id: Ia1ce4e99b4a960b1e70cae0a61b0d526b0353d9a

diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx
index 6e758f6..166717f 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -39,7 +39,9 @@ public:
     void testWeak();
     void testAsian();
     void testThai();
+#if (U_ICU_VERSION_MAJOR_NUM > 51)
     void testLao();
+#endif
 #ifdef TODO
     void testNorthernThai();
 #endif
@@ -52,7 +54,6 @@ public:
     CPPUNIT_TEST(testWeak);
     CPPUNIT_TEST(testAsian);
     CPPUNIT_TEST(testThai);
-    CPPUNIT_TEST(testLao);
 #ifdef TODO
     CPPUNIT_TEST(testNorthernThai);
 #endif
@@ -797,6 +798,7 @@ void TestBreakIterator::testAsian()
     }
 }
 
+#if (U_ICU_VERSION_MAJOR_NUM > 51)
 //A test to ensure that our Lao word boundary detection is useful
 void TestBreakIterator::testLao()
 {
@@ -809,18 +811,16 @@ void TestBreakIterator::testLao()
     i18n::Boundary aBounds = m_xBreak->getWordBoundary(aTest, 0, aLocale,
         i18n::WordType::DICTIONARY_WORD, true);
 
-    CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), aBounds.startPos);
-    //TODO: Expected: 5 | Actual : 12
-    //CPPUNIT_ASSERT_EQUAL(5, aBounds.endPos);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(0), aBounds.startPos);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aBounds.endPos);
 
     aBounds = m_xBreak->getWordBoundary(aTest, aBounds.endPos, aLocale,
         i18n::WordType::DICTIONARY_WORD, true);
 
-    //TODO: Expected: 5 | Actual : 12
-    //CPPUNIT_ASSERT_EQUAL(5, aBounds.startPos);
-    //TODO: Expected: 9 | Actual : 12
-    //CPPUNIT_ASSERT_EQUAL(9, aBounds.endPos);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aBounds.startPos);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(9), aBounds.endPos);
 }
+#endif
 
 //A test to ensure that our thai word boundary detection is useful
 void TestBreakIterator::testThai()


More information about the Libreoffice-commits mailing list