From 8c8ba8df11eafa7ddb6e65b3c4f11faafb7b6403 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 29 May 2015 12:09:20 +0200 Subject: 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 --- i18npool/qa/cppunit/test_breakiterator.cxx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'i18npool/qa') diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx index 6e758f68fd18..166717f7e339 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(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() -- cgit