X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/729e4ab9bc6618bc3d8a898e575df7f4019e29ca..1a147d096ae81f4c8262f7bfc56bd19fc2dee932:/icuSources/test/cintltst/cmsgtst.c diff --git a/icuSources/test/cintltst/cmsgtst.c b/icuSources/test/cintltst/cmsgtst.c index 0d759105..16730092 100644 --- a/icuSources/test/cintltst/cmsgtst.c +++ b/icuSources/test/cintltst/cmsgtst.c @@ -1,6 +1,8 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2010, International Business Machines Corporation and + * Copyright (c) 1997-2016, International Business Machines Corporation and * others. All Rights Reserved. ******************************************************************** * @@ -27,6 +29,7 @@ #include "cintltst.h" #include "cmsgtst.h" #include "cformtst.h" +#include "cmemory.h" static const char* const txt_testCasePatterns[] = { "Quotes '', '{', a {0,number,integer} '{'0}", @@ -87,6 +90,9 @@ static void FreeStrings( void ) strings_initialized = FALSE; } +#if (U_PLATFORM == U_PF_LINUX) /* add platforms here .. */ +/* Keep the #if above in sync with the one below that has the same "add platforms here .." comment. */ +#else /* Platform dependent test to detect if this type will return NULL when interpreted as a pointer. */ static UBool returnsNullForType(int firstParam, ...) { UBool isNULL; @@ -96,6 +102,7 @@ static UBool returnsNullForType(int firstParam, ...) { va_end(marker); return isNULL; } +#endif /* Test u_formatMessage() with various test patterns() */ static void MessageFormatTest( void ) @@ -181,7 +188,7 @@ static void MessageFormatTest( void ) UMessageFormat formatter = umsg_open(testCasePatterns[0],patternLength,"en_US",NULL,&ec); if(U_FAILURE(ec)){ - log_data_err("umsg_open() failed for testCasePattens[%d]. -> %s (Are you missing data?)\n",i, u_errorName(ec)); + log_data_err("umsg_open() failed for testCasePattens[0]. -> %s (Are you missing data?)\n", u_errorName(ec)); return; } for(i = 0;i