mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
ICU-6991 Code coverage for missing functions in MessageFormat.
X-SVN-Rev: 26605
This commit is contained in:
parent
323d5a9b31
commit
05d0e02083
2 changed files with 22 additions and 0 deletions
|
@ -51,6 +51,7 @@ MessageFormatRegressionTest::runIndexedTest( int32_t index, UBool exec, const ch
|
|||
CASE(18,Test4142938)
|
||||
CASE(19,TestChoicePatternQuote)
|
||||
CASE(20,Test4112104)
|
||||
CASE(21,TestAPI)
|
||||
|
||||
default: name = ""; break;
|
||||
}
|
||||
|
@ -972,4 +973,24 @@ void MessageFormatRegressionTest::Test4112104()
|
|||
delete format;
|
||||
}
|
||||
|
||||
void MessageFormatRegressionTest::TestAPI() {
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
MessageFormat *format = new MessageFormat("", status);
|
||||
failure(status, "new MessageFormat");
|
||||
|
||||
// Test adoptFormat
|
||||
MessageFormat *fmt = new MessageFormat("",status);
|
||||
format->adoptFormat("",fmt,status);
|
||||
failure(status, "adoptFormat");
|
||||
|
||||
// Test getFormat
|
||||
format->getFormat("",status);
|
||||
failure(status, "getFormat");
|
||||
|
||||
// Test setFormat
|
||||
format->usesNamedArguments();
|
||||
failure(status, "usesNamedArguments()");
|
||||
delete format;
|
||||
}
|
||||
|
||||
#endif /* #if !UCONFIG_NO_FORMATTING */
|
||||
|
|
|
@ -43,6 +43,7 @@ public:
|
|||
void Test4142938(void);
|
||||
void TestChoicePatternQuote(void);
|
||||
void Test4112104(void);
|
||||
void TestAPI(void);
|
||||
|
||||
protected:
|
||||
UBool failure(UErrorCode status, const char* msg, UBool possibleDataError=FALSE);
|
||||
|
|
Loading…
Add table
Reference in a new issue