-/***********************************************************************
+/********************************************************************
* COPYRIGHT:
- * Copyright (c) 1997-2005, International Business Machines Corporation
- * and others. All Rights Reserved.
- ***********************************************************************/
-
-
+ * Copyright (c) 1997-2013, International Business Machines Corporation and
+ * others. All Rights Reserved.
+ ********************************************************************/
#ifndef _TESTMESSAGEFORMAT
#define _TESTMESSAGEFORMAT
#include "unicode/unistr.h"
#include "unicode/fmtable.h"
+#include "unicode/msgfmt.h"
#include "intltest.h"
/**
**/
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.
*/
void TestRBNF();
- //
+ void TestApostropheMode();
+
+ void TestCompatibleApostrophe();
+
/**
* ------------ API tests ----------
* These routines test various API functionality.
void testAdopt(void);
void TestTurkishCasing(void);
void testAutoQuoteApostrophe(void);
+ void testCoverage();
+ void testGetFormatNames();
+ void TestTrimArgumentName();
+ void TestSelectOrdinal();
+ void TestDecimals();
private:
+ UnicodeString GetPatternAndSkipSyntax(const MessagePattern& pattern);
};
#endif /* #if !UCONFIG_NO_FORMATTING */