From 7be96b6e4a2781bdef223ee2a897d98b46c48792 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Mon, 28 Feb 2011 10:27:31 -0500 Subject: More test cases for Thai-specific format codes. --- svl/qa/unit/svl.cxx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'svl') diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx index f0759249915a..1a2959f0638e 100644 --- a/svl/qa/unit/svl.cxx +++ b/svl/qa/unit/svl.cxx @@ -265,17 +265,26 @@ void Test::testNumberFormat() short nType = NUMBERFORMAT_DEFINED; sal_uInt32 nKey; OUString aCode; - aCode = OUString(RTL_CONSTASCII_USTRINGPARAM("[$-1070000]d/mm/yyyy;@")); // Thai date format (implicit locale). + // Thai date format (implicit locale). + aCode = OUString(RTL_CONSTASCII_USTRINGPARAM("[$-1070000]d/mm/yyyy;@")); if (!aFormatter.PutEntry(aCode, nPos, nType, nKey)) { CPPUNIT_ASSERT_MESSAGE("failed to insert format code '[$-1070000]d/mm/yyyy;@'", false); } - aCode = OUString(RTL_CONSTASCII_USTRINGPARAM("[$-107041E]d/mm/yyyy;@")); // Thai date format (explicit locale) + // Thai date format (explicit locale) + aCode = OUString(RTL_CONSTASCII_USTRINGPARAM("[$-107041E]d/mm/yyyy;@")); if (!aFormatter.PutEntry(aCode, nPos, nType, nKey)) { CPPUNIT_ASSERT_MESSAGE("failed to insert format code '[$-107041E]d/mm/yyyy;@'", false); } + + // Thai date format (using buddhist calendar type). + aCode = OUString(RTL_CONSTASCII_USTRINGPARAM("[~buddhist]D MMMM YYYY")); + if (!aFormatter.PutEntry(aCode, nPos, nType, nKey)) + { + CPPUNIT_ASSERT_MESSAGE("failed to insert format code '[~buddhist]D MMMM YYYY'", false); + } } CPPUNIT_TEST_SUITE_REGISTRATION(Test); -- cgit v1.2.3