X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/46f4442e9a5a4f3b98b7c1083586332f6a8a99a4..a01113dcd0f39d5da295ef82785beff9ed86fe38:/icuSources/test/intltest/tmsgfmt.h diff --git a/icuSources/test/intltest/tmsgfmt.h b/icuSources/test/intltest/tmsgfmt.h index 65308060..dd215365 100644 --- a/icuSources/test/intltest/tmsgfmt.h +++ b/icuSources/test/intltest/tmsgfmt.h @@ -1,10 +1,10 @@ -/*********************************************************************** +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2005, International Business Machines Corporation - * and others. All Rights Reserved. - ***********************************************************************/ - - + * Copyright (c) 1997-2016, International Business Machines Corporation and + * others. All Rights Reserved. + ********************************************************************/ #ifndef _TESTMESSAGEFORMAT #define _TESTMESSAGEFORMAT @@ -14,6 +14,7 @@ #include "unicode/unistr.h" #include "unicode/fmtable.h" +#include "unicode/msgfmt.h" #include "intltest.h" /** @@ -61,6 +62,26 @@ public: **/ void testMsgFormatPlural(/* char* par */); + /** + * tests MessageFormat functionality with a SelectFormat. + **/ + void testMsgFormatSelect(/* char* par */); + + void testApostropheInPluralAndSelect(); + + /** + * Internal method to format a MessageFormat object with passed args + **/ + void internalFormat(MessageFormat* msgFmt , + Formattable* args , int32_t numOfArgs , + UnicodeString expected, const char* errMsg); + + /** + * Internal method to create a MessageFormat object with passed args + **/ + MessageFormat* internalCreate( + UnicodeString pattern ,Locale locale , UErrorCode& err, char* errMsg); + /** * Verify that MessageFormat accomodates more than 10 arguments * and more than 10 subformats. @@ -72,7 +93,10 @@ public: */ void TestRBNF(); - // + void TestApostropheMode(); + + void TestCompatibleApostrophe(); + /** * ------------ API tests ---------- * These routines test various API functionality. @@ -91,8 +115,21 @@ public: void testAdopt(void); void TestTurkishCasing(void); void testAutoQuoteApostrophe(void); + void testCoverage(); + void testGetFormatNames(); + void TestTrimArgumentName(); + void TestSelectOrdinal(); + void TestDecimals(); + void TestArgIsPrefixOfAnother(); + void TestMessageFormatNumberSkeleton(); + void TestMessageFormatDateSkeleton(); + void TestMessageFormatTimeSkeleton(); private: + UnicodeString GetPatternAndSkipSyntax(const MessagePattern& pattern); + void doTheRealDateTimeSkeletonTesting(UDate testDate, + const char16_t* messagePattern, const char* localeName, const char16_t* expected, + IcuTestErrorCode& status); }; #endif /* #if !UCONFIG_NO_FORMATTING */