Kaydet (Commit) fad63878 authored tarafından Caolán McNamara's avatar Caolán McNamara

add northern-thai example

üst 1a450f53
...@@ -260,14 +260,24 @@ void TestBreakIterator::testThai() ...@@ -260,14 +260,24 @@ void TestBreakIterator::testThai()
aLocale.Language = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("th")); aLocale.Language = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("th"));
aLocale.Country = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TH")); aLocale.Country = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TH"));
i18n::Boundary aBounds;
{ {
const sal_Unicode THAI1[] = { 0x0E01, 0x0E38, 0x0E2B, 0x0E25, 0x0E32, 0x0E1A }; const sal_Unicode THAI1[] = { 0x0E01, 0x0E38, 0x0E2B, 0x0E25, 0x0E32, 0x0E1A };
::rtl::OUString aTest1(THAI1, SAL_N_ELEMENTS(THAI1)); ::rtl::OUString aTest(THAI1, SAL_N_ELEMENTS(THAI1));
i18n::Boundary aBounds = m_xBreak->getWordBoundary(aTest1, 0, aLocale, aBounds = m_xBreak->getWordBoundary(aTest, 0, aLocale,
i18n::WordType::DICTIONARY_WORD, true); i18n::WordType::DICTIONARY_WORD, true);
CPPUNIT_ASSERT_MESSAGE("Should skip full word", CPPUNIT_ASSERT_MESSAGE("Should skip full word",
aBounds.startPos == 0 && aBounds.endPos == aTest1.getLength()); aBounds.startPos == 0 && aBounds.endPos == aTest.getLength());
}
{
const sal_Unicode NORTHERN_THAI1[] = { 0x0E01, 0x0E38, 0x0E4A, 0x0E2B, 0x0E25, 0x0E32, 0x0E1A };
::rtl::OUString aTest(NORTHERN_THAI1, SAL_N_ELEMENTS(NORTHERN_THAI1));
aBounds = m_xBreak->getWordBoundary(aTest, 0, aLocale,
i18n::WordType::DICTIONARY_WORD, true);
CPPUNIT_ASSERT_MESSAGE("Should skip full word",
aBounds.startPos == 0 && aBounds.endPos == aTest.getLength());
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment