From edfa6cd3e5d27d793bfb2e7d23e2fdb4dbc09a69 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 31 Aug 2012 10:30:35 +0100 Subject: Related: #i103552# add regression test for シャットダウン MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I30117fdf70036f6df8dc494fe33a8a56d5544635 --- i18npool/qa/cppunit/test_breakiterator.cxx | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'i18npool/qa') diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx index 3fb555dce48e..63f9708e708d 100644 --- a/i18npool/qa/cppunit/test_breakiterator.cxx +++ b/i18npool/qa/cppunit/test_breakiterator.cxx @@ -61,6 +61,7 @@ public: void testNorthernThai(); #endif void testKhmer(); + void testJapanese(); CPPUNIT_TEST_SUITE(TestBreakIterator); CPPUNIT_TEST(testLineBreaking); @@ -75,6 +76,7 @@ public: CPPUNIT_TEST(testWordBoundaries); CPPUNIT_TEST(testKhmer); #endif + CPPUNIT_TEST(testJapanese); CPPUNIT_TEST_SUITE_END(); private: uno::Reference m_xBreak; @@ -820,9 +822,9 @@ void TestBreakIterator::testKhmer() aLocale.Language = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("km")); aLocale.Country = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("KH")); - const sal_Unicode KHMER1[] = { 0x17B2, 0x17D2, 0x1799, 0x1782, 0x17C1 }; + const sal_Unicode KHMER[] = { 0x17B2, 0x17D2, 0x1799, 0x1782, 0x17C1 }; - rtl::OUString aTest(KHMER1, SAL_N_ELEMENTS(KHMER1)); + rtl::OUString aTest(KHMER, SAL_N_ELEMENTS(KHMER)); i18n::Boundary aBounds = m_xBreak->getWordBoundary(aTest, 0, aLocale, i18n::WordType::DICTIONARY_WORD, true); @@ -835,6 +837,21 @@ void TestBreakIterator::testKhmer() } #endif +void TestBreakIterator::testJapanese() +{ + lang::Locale aLocale; + aLocale.Language = OUString("ja"); + aLocale.Country = OUString("JP"); + + const sal_Unicode JAPANESE[] = { 0x30B7, 0x30E3, 0x30C3, 0x30C8, 0x30C0, 0x30A6, 0x30F3 }; + + rtl::OUString aTest(JAPANESE, SAL_N_ELEMENTS(JAPANESE)); + i18n::Boundary aBounds = m_xBreak->getWordBoundary(aTest, 5, aLocale, + i18n::WordType::DICTIONARY_WORD, true); + + CPPUNIT_ASSERT(aBounds.startPos == 0 && aBounds.endPos == 7); +} + void TestBreakIterator::setUp() { BootstrapFixtureBase::setUp(); -- cgit